From 41d6ff319a1c0432c57be5d2020d7c8df19653ec Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 18 Apr 2014 23:46:27 -0700 Subject: [PATCH] Bug 990353 - Tests. r=bent --- js/xpconnect/tests/chrome/chrome.ini | 3 + .../chrome/file_discardSystemSource.html | 18 +++++ js/xpconnect/tests/chrome/mochitest.ini | 3 + .../tests/chrome/test_discardSystemSource.xul | 78 +++++++++++++++++++ .../chrome/worker_discardSystemSource.js | 5 ++ 5 files changed, 107 insertions(+) create mode 100644 js/xpconnect/tests/chrome/file_discardSystemSource.html create mode 100644 js/xpconnect/tests/chrome/test_discardSystemSource.xul create mode 100644 js/xpconnect/tests/chrome/worker_discardSystemSource.js diff --git a/js/xpconnect/tests/chrome/chrome.ini b/js/xpconnect/tests/chrome/chrome.ini index 9ff00d017d7d..747f885adc6d 100644 --- a/js/xpconnect/tests/chrome/chrome.ini +++ b/js/xpconnect/tests/chrome/chrome.ini @@ -3,6 +3,8 @@ support-files = bug503926.xul file_bug618176.xul file_bug996069.html + file_discardSystemSource.html + worker_discardSystemSource.js file_evalInSandbox.html file_expandosharing.jsm outoflinexulscript.js @@ -57,6 +59,7 @@ support-files = [test_chrometoSource.xul] [test_cloneInto.xul] [test_cows.xul] +[test_discardSystemSource.xul] [test_documentdomain.xul] [test_doublewrappedcompartments.xul] [test_evalInSandbox.xul] diff --git a/js/xpconnect/tests/chrome/file_discardSystemSource.html b/js/xpconnect/tests/chrome/file_discardSystemSource.html new file mode 100644 index 000000000000..9f264ffe5d1f --- /dev/null +++ b/js/xpconnect/tests/chrome/file_discardSystemSource.html @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/js/xpconnect/tests/chrome/mochitest.ini b/js/xpconnect/tests/chrome/mochitest.ini index db4574b58154..83320a4820ee 100644 --- a/js/xpconnect/tests/chrome/mochitest.ini +++ b/js/xpconnect/tests/chrome/mochitest.ini @@ -1 +1,4 @@ [DEFAULT] +support-files = + file_discardSystemSource.html + worker_discardSystemSource.js diff --git a/js/xpconnect/tests/chrome/test_discardSystemSource.xul b/js/xpconnect/tests/chrome/test_discardSystemSource.xul new file mode 100644 index 000000000000..558d7c7d680f --- /dev/null +++ b/js/xpconnect/tests/chrome/test_discardSystemSource.xul @@ -0,0 +1,78 @@ + + + + + + + + diff --git a/js/xpconnect/tests/chrome/worker_discardSystemSource.js b/js/xpconnect/tests/chrome/worker_discardSystemSource.js new file mode 100644 index 000000000000..9274505ee3ec --- /dev/null +++ b/js/xpconnect/tests/chrome/worker_discardSystemSource.js @@ -0,0 +1,5 @@ +function canary() { + var someBitOfSource = 42; +} + +postMessage(canary.toSource());