42 let uniqueValue = Math.random();
44 let
testURL =
"chrome://mochikit/content/browser/" +
45 "browser/components/sessionstore/test/browser/browser_485482_sample.html";
46 let
tab = gBrowser.addTab(testURL);
47 tab.linkedBrowser.addEventListener(
"load",
function(aEvent) {
48 let
doc = tab.linkedBrowser.contentDocument;
49 doc.querySelector(
"input[type=text]").value = uniqueValue;
50 doc.querySelector(
"input[type=checkbox]").checked =
true;
52 let
tab2 = gBrowser.duplicateTab(tab);
53 tab2.linkedBrowser.addEventListener(
"load",
function(aEvent) {
54 doc = tab2.linkedBrowser.contentDocument;
55 is(doc.querySelector(
"input[type=text]").value, uniqueValue,
56 "generated XPath expression was valid");
57 ok(doc.querySelector(
"input[type=checkbox]").checked,
58 "generated XPath expression was valid");
61 gBrowser.removeTab(tab2);
62 gBrowser.removeTab(tab);
function doc() browser.contentDocument