diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
commit | 8148615da179fdd60f19018e13b4e94b95609cc6 (patch) | |
tree | 771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/components/sessionstore/test/browser_456342.js | |
parent | 494802c1be7888025b95260d23db187467d2b9dd (diff) | |
download | UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.gz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.lz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.xz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.zip |
Remove browser tests - Part 1: The Tests (except for experiments)
Diffstat (limited to 'browser/components/sessionstore/test/browser_456342.js')
-rw-r--r-- | browser/components/sessionstore/test/browser_456342.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/browser/components/sessionstore/test/browser_456342.js b/browser/components/sessionstore/test/browser_456342.js deleted file mode 100644 index d7ed33ee5..000000000 --- a/browser/components/sessionstore/test/browser_456342.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -"use strict"; - -const URL = ROOT + "browser_456342_sample.xhtml"; - -/** - * Bug 456342 - Restore values from non-standard input field types. - */ -add_task(function test_restore_nonstandard_input_values() { - // Add tab with various non-standard input field types. - let tab = gBrowser.addTab(URL); - let browser = tab.linkedBrowser; - yield promiseBrowserLoaded(browser); - - // Fill in form values. - let expectedValue = Math.random(); - yield setFormElementValues(browser, {value: expectedValue}); - - // Remove tab and check collected form data. - yield promiseRemoveTab(tab); - let undoItems = JSON.parse(ss.getClosedTabData(window)); - let savedFormData = undoItems[0].state.formdata; - - let countGood = 0, countBad = 0; - for (let id of Object.keys(savedFormData.id)) { - if (savedFormData.id[id] == expectedValue) { - countGood++; - } else { - countBad++; - } - } - - for (let exp of Object.keys(savedFormData.xpath)) { - if (savedFormData.xpath[exp] == expectedValue) { - countGood++; - } else { - countBad++; - } - } - - is(countGood, 4, "Saved text for non-standard input fields"); - is(countBad, 0, "Didn't save text for ignored field types"); -}); - -function setFormElementValues(browser, data) { - return sendMessage(browser, "ss-test:setFormElementValues", data); -} |