Bug 758297 - Move <iframe mozbrowser> code to dom/browser-element. r=mounir
authorJustin Lebar <justin.lebar@gmail.com>
Thu, 07 Jun 2012 10:49:48 -0400
changeset 101359 c84a182666fd88cff597636be103e5d05d7efba1
parent 101358 9cb6215dea024d9a3348561ee06d8804233099f2
child 101360 3ae4c048cb68b3b1a17efbce2985049dd7233709
push id191
push userlsblakk@mozilla.com
push dateFri, 05 Oct 2012 17:12:53 +0000
treeherdermozilla-release@ddb22ac6c03b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs758297
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 758297 - Move <iframe mozbrowser> code to dom/browser-element. r=mounir
dom/Makefile.in
dom/base/BrowserElementChild.js
dom/base/BrowserElementParent.js
dom/base/BrowserElementParent.manifest
dom/base/BrowserElementPromptService.jsm
dom/base/Makefile.in
dom/browser-element/BrowserElementChild.js
dom/browser-element/BrowserElementParent.js
dom/browser-element/BrowserElementParent.manifest
dom/browser-element/BrowserElementPromptService.jsm
dom/browser-element/Makefile.in
dom/browser-element/mochitest/Makefile.in
dom/browser-element/mochitest/browserFrameHelpers.js
dom/browser-element/mochitest/file_empty.html
dom/browser-element/mochitest/file_focus.html
dom/browser-element/mochitest/test_browserFrame1.html
dom/browser-element/mochitest/test_browserFrame10.html
dom/browser-element/mochitest/test_browserFrame2.html
dom/browser-element/mochitest/test_browserFrame3.html
dom/browser-element/mochitest/test_browserFrame4.html
dom/browser-element/mochitest/test_browserFrame5.html
dom/browser-element/mochitest/test_browserFrame6.html
dom/browser-element/mochitest/test_browserFrame7.html
dom/browser-element/mochitest/test_browserFrame8.html
dom/browser-element/mochitest/test_browserFrame9.html
dom/browser-element/mochitest/test_browserFrameAlert.html
dom/browser-element/mochitest/test_browserFramePromptCheck.html
dom/browser-element/mochitest/test_browserFramePromptConfirm.html
dom/browser-element/mochitest/test_browserFrame_keyEvents.html
dom/ipc/jar.mn
dom/tests/mochitest/Makefile.in
dom/tests/mochitest/browser-frame/Makefile.in
dom/tests/mochitest/browser-frame/Makefile.in.orig
dom/tests/mochitest/browser-frame/browserFrameHelpers.js
dom/tests/mochitest/browser-frame/file_empty.html
dom/tests/mochitest/browser-frame/file_focus.html
dom/tests/mochitest/browser-frame/test_browserFrame1.html
dom/tests/mochitest/browser-frame/test_browserFrame10.html
dom/tests/mochitest/browser-frame/test_browserFrame2.html
dom/tests/mochitest/browser-frame/test_browserFrame3.html
dom/tests/mochitest/browser-frame/test_browserFrame4.html
dom/tests/mochitest/browser-frame/test_browserFrame5.html
dom/tests/mochitest/browser-frame/test_browserFrame6.html
dom/tests/mochitest/browser-frame/test_browserFrame7.html
dom/tests/mochitest/browser-frame/test_browserFrame8.html
dom/tests/mochitest/browser-frame/test_browserFrame9.html
dom/tests/mochitest/browser-frame/test_browserFrameAlert.html
dom/tests/mochitest/browser-frame/test_browserFramePromptCheck.html
dom/tests/mochitest/browser-frame/test_browserFramePromptConfirm.html
dom/tests/mochitest/browser-frame/test_browserFrame_keyEvents.html
--- a/dom/Makefile.in
+++ b/dom/Makefile.in
@@ -43,16 +43,17 @@ DIRS += \
   interfaces/apps \
   $(NULL)
 
 DIRS += \
   apps \
   base \
   bindings \
   battery \
+  browser-element \
   contacts \
   devicestorage \
   file \
   media \
   power \
   settings \
   sms \
   mms \
--- a/dom/base/Makefile.in
+++ b/dom/base/Makefile.in
@@ -17,27 +17,24 @@ FORCE_STATIC_LIB = 1
 
 DIRS = \
   test \
   $(NULL)
 
 EXTRA_PP_COMPONENTS = \
   ConsoleAPI.js \
   ConsoleAPI.manifest \
-  BrowserElementParent.js \
-  BrowserElementParent.manifest \
   $(NULL)
 
 EXTRA_JS_MODULES = ConsoleAPIStorage.jsm \
   $(NULL)
 
 EXTRA_JS_MODULES += \
   DOMRequestHelper.jsm \
   IndexedDBHelper.jsm \
-  BrowserElementPromptService.jsm \
   $(NULL)
 
 XPIDLSRCS = \
   nsIDOMDOMError.idl \
   nsIDOMDOMRequest.idl \
   nsIEntropyCollector.idl \
   nsIScriptChannel.idl \
   $(NULL)
rename from dom/base/BrowserElementChild.js
rename to dom/browser-element/BrowserElementChild.js
rename from dom/base/BrowserElementParent.js
rename to dom/browser-element/BrowserElementParent.js
rename from dom/base/BrowserElementParent.manifest
rename to dom/browser-element/BrowserElementParent.manifest
rename from dom/base/BrowserElementPromptService.jsm
rename to dom/browser-element/BrowserElementPromptService.jsm
new file mode 100644
--- /dev/null
+++ b/dom/browser-element/Makefile.in
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DEPTH            = ../..
+topsrcdir        = @top_srcdir@
+srcdir           = @srcdir@
+VPATH            = @srcdir@
+
+relativesrcdir   = dom/browser-element
+
+include $(DEPTH)/config/autoconf.mk
+
+TEST_DIRS += mochitest
+
+EXTRA_COMPONENTS = \
+  BrowserElementParent.js \
+  BrowserElementParent.manifest \
+  $(NULL)
+
+EXTRA_JS_MODULES = \
+  BrowserElementPromptService.jsm \
+  $(NULL)
+
+include $(topsrcdir)/config/rules.mk
rename from dom/tests/mochitest/browser-frame/Makefile.in
rename to dom/browser-element/mochitest/Makefile.in
--- a/dom/tests/mochitest/browser-frame/Makefile.in
+++ b/dom/browser-element/mochitest/Makefile.in
@@ -1,18 +1,18 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-DEPTH		= ../../../..
+DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = dom/tests/mochitest/browser-frame
+relativesrcdir  = dom/browser-element/mochitest
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
 		file_empty.html \
 		file_focus.html \
 		browserFrameHelpers.js \
rename from dom/tests/mochitest/browser-frame/browserFrameHelpers.js
rename to dom/browser-element/mochitest/browserFrameHelpers.js
rename from dom/tests/mochitest/browser-frame/file_empty.html
rename to dom/browser-element/mochitest/file_empty.html
rename from dom/tests/mochitest/browser-frame/file_focus.html
rename to dom/browser-element/mochitest/file_focus.html
--- a/dom/tests/mochitest/browser-frame/file_focus.html
+++ b/dom/browser-element/mochitest/file_focus.html
@@ -17,9 +17,8 @@ document.getElementById('url').innerHTML
         alreadyBlocked == false) {
       alreadyBlocked = true;
       e.preventDefault();
     }
   });
 </script>
 </body>
 </html>
-
rename from dom/tests/mochitest/browser-frame/test_browserFrame1.html
rename to dom/browser-element/mochitest/test_browserFrame1.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame10.html
rename to dom/browser-element/mochitest/test_browserFrame10.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame2.html
rename to dom/browser-element/mochitest/test_browserFrame2.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame3.html
rename to dom/browser-element/mochitest/test_browserFrame3.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame4.html
rename to dom/browser-element/mochitest/test_browserFrame4.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame5.html
rename to dom/browser-element/mochitest/test_browserFrame5.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame6.html
rename to dom/browser-element/mochitest/test_browserFrame6.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame7.html
rename to dom/browser-element/mochitest/test_browserFrame7.html
--- a/dom/tests/mochitest/browser-frame/test_browserFrame7.html
+++ b/dom/browser-element/mochitest/test_browserFrame7.html
@@ -39,17 +39,17 @@ function runTest() {
   iframe.style.display = 'none';
   document.body.appendChild(iframe);
 
   SimpleTest.waitForExplicitFinish();
 }
 
 var numMsgReceived = 0;
 function outerIframeLoaded() {
-  var injectedScript = 
+  var injectedScript =
     "data:,function is(a, b, desc) {                                     \
       if (a == b) {                                                      \
         sendAsyncMessage('test:test-pass', desc);                        \
       } else {                                                           \
         sendAsyncMessage('test:test-fail', desc + ' ' + a + ' != ' + b); \
       }                                                                  \
     }                                                                    \
     is(content.window.top, content.window, 'top');                       \
@@ -62,17 +62,17 @@ function outerIframeLoaded() {
     is(innerWindow.frameElement, innerIframe, 'inner frameElement');"
 
   var mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
 
   function onRecvTestPass(msg) {
     numMsgReceived++;
     ok(true, msg.json);
   }
-  mm.addMessageListener('test:test-pass', onRecvTestPass); 
+  mm.addMessageListener('test:test-pass', onRecvTestPass);
 
   function onRecvTestFail(msg) {
     numMsgReceived++;
     ok(false, msg.json);
   }
   mm.addMessageListener('test:test-fail', onRecvTestFail);
 
   mm.loadFrameScript(injectedScript, /* allowDelayedLoad = */ false);
@@ -80,17 +80,17 @@ function outerIframeLoaded() {
   waitForMessages(6);
 }
 
 function waitForMessages(num) {
   if (numMsgReceived < num) {
     SimpleTest.executeSoon(function() { waitForMessages(num); });
     return;
   }
-  
+
   SimpleTest.finish();
 }
 
 runTest();
 
 </script>
 </body>
 </html>
rename from dom/tests/mochitest/browser-frame/test_browserFrame8.html
rename to dom/browser-element/mochitest/test_browserFrame8.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame9.html
rename to dom/browser-element/mochitest/test_browserFrame9.html
rename from dom/tests/mochitest/browser-frame/test_browserFrameAlert.html
rename to dom/browser-element/mochitest/test_browserFrameAlert.html
rename from dom/tests/mochitest/browser-frame/test_browserFramePromptCheck.html
rename to dom/browser-element/mochitest/test_browserFramePromptCheck.html
rename from dom/tests/mochitest/browser-frame/test_browserFramePromptConfirm.html
rename to dom/browser-element/mochitest/test_browserFramePromptConfirm.html
rename from dom/tests/mochitest/browser-frame/test_browserFrame_keyEvents.html
rename to dom/browser-element/mochitest/test_browserFrame_keyEvents.html
--- a/dom/ipc/jar.mn
+++ b/dom/ipc/jar.mn
@@ -1,8 +1,8 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 toolkit.jar:
         content/global/test-ipc.xul (test.xul)
         content/global/remote-test-ipc.js (remote-test.js)
-        content/global/BrowserElementChild.js (../base/BrowserElementChild.js)
+        content/global/BrowserElementChild.js (../browser-element/BrowserElementChild.js)
--- a/dom/tests/mochitest/Makefile.in
+++ b/dom/tests/mochitest/Makefile.in
@@ -22,17 +22,16 @@ DIRS	+= \
 	general \
 	whatwg \
 	geolocation \
 	localstorage \
 	orientation \
 	sessionstorage \
 	storageevent \
 	pointerlock \
-	browser-frame \
 	webapps \
 	$(NULL)
 
 #needs IPC support, also tests do not run successfully in Firefox for now
 #ifneq (mobile,$(MOZ_BUILD_APP))
 #DIRS	+= notification
 #endif
 
deleted file mode 100644
--- a/dom/tests/mochitest/browser-frame/Makefile.in.orig
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH		= ../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-relativesrcdir  = dom/tests/mochitest/browser-frame
-
-include $(DEPTH)/config/autoconf.mk
-include $(topsrcdir)/config/rules.mk
-
-_TEST_FILES = \
-		file_empty.html \
-		file_focus.html \
-		browserFrameHelpers.js \
-		test_browserFrame1.html \
-		test_browserFrame2.html \
-		test_browserFrame3.html \
-		test_browserFrame4.html \
-		test_browserFrame5.html \
-		test_browserFrame6.html \
-		test_browserFrame7.html \
-		test_browserFrame8.html \
-		test_browserFrame9.html \
-<<<<<<< HEAD
-		test_browserFrame10.html \
-		test_browserFrame_keyEvents.html \
-=======
-		test_browserFrameAlert.html \
-		test_browserFramePromptCheck.html \
-		test_browserFramePromptConfirm.html \
->>>>>>> Bug 741587 - Part 2: Tests for alert/prompt/confirm in <iframe mozbrowser>.
-		$(NULL)
-
-libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)