Bug 1322414 - part 2,3,4: use a separate 'primary' attribute for primary child browsers, r=bz,mconley
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 09 Dec 2016 09:23:24 -1000
changeset 371010 e3c689dbcd927272608bc02d82c79156ae4165bd
parent 371009 9a6a73f376490b237e4607a1b4af1b11cd95fc33
child 371011 d3c63b6f02c2019f5f593545f8907ac1e36f2375
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, mconley
bugs1322414
milestone53.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 1322414 - part 2,3,4: use a separate 'primary' attribute for primary child browsers, r=bz,mconley MozReview-Commit-ID: 2yb0WGFYBsH
browser/base/content/tabbrowser.xml
docshell/test/chrome/bug112564_window.xul
docshell/test/chrome/bug215405_window.xul
docshell/test/chrome/bug293235_window.xul
docshell/test/chrome/bug294258_window.xul
docshell/test/chrome/bug298622_window.xul
docshell/test/chrome/bug301397_window.xul
docshell/test/chrome/bug303267_window.xul
docshell/test/chrome/bug311007_window.xul
docshell/test/chrome/bug321671_window.xul
docshell/test/chrome/bug360511_window.xul
docshell/test/chrome/bug364461_window.xul
docshell/test/chrome/bug396519_window.xul
docshell/test/chrome/bug396649_window.xul
docshell/test/chrome/bug582176_window.xul
docshell/test/chrome/bug662200_window.xul
docshell/test/chrome/bug690056_window.xul
docshell/test/chrome/bug89419_window.xul
docshell/test/chrome/bug92598_window.xul
docshell/test/chrome/window.template.txt
dom/base/nsFrameLoader.cpp
dom/base/test/chrome/file_bug1209621.xul
dom/events/test/window_bug617528.xul
dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xul
dom/xul/nsXULElement.cpp
editor/composer/test/test_bug434998.xul
editor/libeditor/tests/test_bug607584.xul
editor/libeditor/tests/test_bug780908.xul
layout/generic/test/file_bug514732_window.xul
layout/reftests/bugs/558011-1-ref.xul
layout/reftests/bugs/558011-1.xul
layout/tools/layout-debug/ui/content/layoutdebug.xul
layout/tools/recording/recording.xul
layout/tools/reftest/reftest.jsm
mobile/android/chrome/content/browser.js
mobile/android/chrome/content/geckoview.xul
toolkit/components/printing/content/printUtils.js
toolkit/components/viewsource/content/viewPartialSource.xul
toolkit/components/viewsource/content/viewSource.xul
toolkit/content/tests/chrome/bug263683_window.xul
toolkit/content/tests/chrome/bug304188_window.xul
toolkit/content/tests/chrome/bug331215_window.xul
toolkit/content/tests/chrome/bug360437_window.xul
toolkit/content/tests/chrome/bug409624_window.xul
toolkit/content/tests/chrome/bug429723_window.xul
toolkit/content/tests/chrome/bug451540_window.xul
toolkit/content/tests/chrome/findbar_entireword_window.xul
toolkit/content/tests/chrome/findbar_events_window.xul
toolkit/content/tests/chrome/findbar_window.xul
toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -19,17 +19,18 @@
       <xul:tabbox anonid="tabbox" class="tabbrowser-tabbox"
                   flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown"
                   onselect="if (event.target.localName == 'tabpanels') this.parentNode.updateCurrentBrowser();">
         <xul:tabpanels flex="1" class="plain" selectedIndex="0" anonid="panelcontainer">
           <xul:notificationbox flex="1" notificationside="top">
             <xul:hbox flex="1" class="browserSidebarContainer">
               <xul:vbox flex="1" class="browserContainer">
                 <xul:stack flex="1" class="browserStack" anonid="browserStack">
-                  <xul:browser anonid="initialBrowser" type="content-primary" message="true" messagemanagergroup="browsers"
+                  <xul:browser anonid="initialBrowser" type="content" message="true" messagemanagergroup="browsers"
+                               primary="true"
                                xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker"/>
                 </xul:stack>
               </xul:vbox>
             </xul:hbox>
           </xul:notificationbox>
         </xul:tabpanels>
       </xul:tabbox>
       <children/>
@@ -1087,19 +1088,19 @@
               if (!this._lastRelatedTab.selected)
                 this._lastRelatedTab.owner = null;
               this._lastRelatedTab = null;
             }
 
             var oldBrowser = this.mCurrentBrowser;
 
             if (!gMultiProcessBrowser) {
-              oldBrowser.setAttribute("type", "content");
+              oldBrowser.removeAttribute("primary");
               oldBrowser.docShellIsActive = false;
-              newBrowser.setAttribute("type", "content-primary");
+              newBrowser.setAttribute("primary", "true");
               newBrowser.docShellIsActive =
                 (window.windowState != window.STATE_MINIMIZED);
             }
 
             var updateBlockedPopups = false;
             if ((oldBrowser.blockedPopups && !newBrowser.blockedPopups) ||
                 (!oldBrowser.blockedPopups && newBrowser.blockedPopups))
               updateBlockedPopups = true;
@@ -2617,17 +2618,17 @@
 
             if (browser.registeredOpenURI && !aAdoptedByTab) {
               this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI,
                                                        browser.getAttribute("usercontextid") || 0);
               delete browser.registeredOpenURI;
             }
 
             // We are no longer the primary content area.
-            browser.setAttribute("type", "content");
+            browser.removeAttribute("primary");
 
             // Remove this tab as the owner of any other tabs, since it's going away.
             for (let tab of this.tabs) {
               if ("owner" in tab && tab.owner == aTab)
                 // |tab| is a child of the tab we're removing, make it an orphan
                 tab.owner = null;
             }
 
@@ -3752,26 +3753,26 @@
               this.assert(!this.loadTimer);
               this.assert(!this.loadingTab);
               this.assert(this.lastVisibleTab === this.requestedTab);
               this.assert(this.minimized || this.getTabState(this.requestedTab) == this.STATE_LOADED);
 
               this.destroy();
 
               let toBrowser = this.requestedTab.linkedBrowser;
-              toBrowser.setAttribute("type", "content-primary");
+              toBrowser.setAttribute("primary", "true");
 
               this.tabbrowser._adjustFocusAfterTabSwitch(this.requestedTab);
 
               let fromBrowser = this.originalTab.linkedBrowser;
               // It's possible that the tab we're switching from closed
               // before we were able to finalize, in which case, fromBrowser
               // doesn't exist.
               if (fromBrowser) {
-                fromBrowser.setAttribute("type", "content");
+                fromBrowser.removeAttribute("primary");
               }
 
               let event = new CustomEvent("TabSwitchDone", {
                 bubbles: true,
                 cancelable: true
               });
               this.tabbrowser.dispatchEvent(event);
             },
--- a/docshell/test/chrome/bug112564_window.xul
+++ b/docshell/test/chrome/bug112564_window.xul
@@ -106,10 +106,10 @@
                    {type: "pageshow", title: "test1", persisted: true}];
       gBrowser.goBack();
       yield undefined;
 
       finish();
     }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug215405_window.xul
+++ b/docshell/test/chrome/bug215405_window.xul
@@ -151,10 +151,10 @@
          " vertical axis scroll position not correctly restored");
       var formValue = gBrowser.contentDocument.getElementById("inp").value;
       is(formValue, text, testName + " form value not correctly restored");
       
       finish();
     }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug293235_window.xul
+++ b/docshell/test/chrome/bug293235_window.xul
@@ -151,10 +151,10 @@
          "visited link should be purple");
 
       // Tell the framework the test is finished.
       finish();
     }
 
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug294258_window.xul
+++ b/docshell/test/chrome/bug294258_window.xul
@@ -65,10 +65,10 @@
       is($("select").selectedIndex, 2, "Select value changed");
 
       // Tell the framework the test is finished.
       finish();
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug298622_window.xul
+++ b/docshell/test/chrome/bug298622_window.xul
@@ -136,11 +136,11 @@
     }
     
   ]]></script>
 
   <commandset>
     <command id="cmd_find"
      oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
   </commandset>
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/docshell/test/chrome/bug301397_window.xul
+++ b/docshell/test/chrome/bug301397_window.xul
@@ -239,10 +239,10 @@
       verifyIframeInnerHtml("You made it");
       
       // Tell the framework the test is finished.
       finish();
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug303267_window.xul
+++ b/docshell/test/chrome/bug303267_window.xul
@@ -90,10 +90,10 @@
     // Return the innerHTML of a particular element in the content document.
     //
     function getInnerHTMLById(id) {
       return TestWindow.getDocument().getElementById(id).innerHTML;
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug311007_window.xul
+++ b/docshell/test/chrome/bug311007_window.xul
@@ -190,10 +190,10 @@ function step4B(aWebProgress, aRequest, 
 
   /* End. */
   aWebProgress.removeProgressListener(gListener);
   delete(gListener);
   finish();
 }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug321671_window.xul
+++ b/docshell/test/chrome/bug321671_window.xul
@@ -122,10 +122,10 @@
       }
       
       // Tell the framework the test is finished.
       finish();
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug360511_window.xul
+++ b/docshell/test/chrome/bug360511_window.xul
@@ -123,10 +123,10 @@
       }
                       
       // Tell the framework the test is finished.
       finish();
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug364461_window.xul
+++ b/docshell/test/chrome/bug364461_window.xul
@@ -261,10 +261,10 @@
       
       is(gBrowser.currentURI.spec, "data:text/plain,aaa",
          "Navigation is blocked when clicking link");
 
       finish();
     }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug396519_window.xul
+++ b/docshell/test/chrome/bug396519_window.xul
@@ -158,10 +158,10 @@
       gExpected = [false, false, true, true, false, false];
       gBrowser.gotoIndex(5);
       yield undefined;
 
       finish();
     }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug396649_window.xul
+++ b/docshell/test/chrome/bug396649_window.xul
@@ -111,10 +111,10 @@
       }
       
       // Tell the framework the test is finished.
       finish();
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug582176_window.xul
+++ b/docshell/test/chrome/bug582176_window.xul
@@ -77,10 +77,10 @@
 
       os.removeObserver(observer, "content-document-global-created")
 
       // Tell the framework the test is finished.
       finish();
     }
     
   ]]></script>
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug662200_window.xul
+++ b/docshell/test/chrome/bug662200_window.xul
@@ -118,10 +118,10 @@
       is(shistory.requestedIndex, -1, "Requested index should be cleared!");
 
       // Tell the framework the test is finished.
       finish();
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug690056_window.xul
+++ b/docshell/test/chrome/bug690056_window.xul
@@ -165,10 +165,10 @@
       });
       yield undefined;
 
       // Tell the framework the test is finished.
       finish();
     }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug89419_window.xul
+++ b/docshell/test/chrome/bug89419_window.xul
@@ -71,10 +71,10 @@
       ok(snapshotsEqual(first, third), "going back should be the same as the initial load");
 
       // Tell the framework the test is finished.
       finish();
     }
 
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/bug92598_window.xul
+++ b/docshell/test/chrome/bug92598_window.xul
@@ -107,10 +107,10 @@
                    {type: "pageshow", title: "test1", persisted: false}];
       gBrowser.goBack();
       yield undefined;
 
       finish();
     }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/docshell/test/chrome/window.template.txt
+++ b/docshell/test/chrome/window.template.txt
@@ -35,10 +35,10 @@
       // Tell the framework the test is finished.  Include the final 'yield' 
       // statement to prevent a StopIteration exception from being thrown.
       finish();
       yield undefined;
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -962,26 +962,18 @@ nsFrameLoader::AddTreeItemToTreeOwner(ns
                                       nsIDocShellTreeOwner* aOwner,
                                       int32_t aParentType,
                                       nsIDocShell* aParentNode)
 {
   NS_PRECONDITION(aItem, "Must have docshell treeitem");
   NS_PRECONDITION(mOwnerContent, "Must have owning content");
 
   nsAutoString value;
-  bool isContent = false;
-  mOwnerContent->GetAttr(kNameSpaceID_None, TypeAttrName(), value);
-
-  // we accept "content" and "content-xxx" values.
-  // at time of writing, we expect "xxx" to be "primary" or "targetable", but
-  // someday it might be an integer expressing priority or something else.
-
-  isContent = value.LowerCaseEqualsLiteral("content") ||
-    StringBeginsWith(value, NS_LITERAL_STRING("content-"),
-                     nsCaseInsensitiveStringComparator());
+  bool isContent = mOwnerContent->AttrValueIs(
+    kNameSpaceID_None, TypeAttrName(), nsGkAtoms::content, eIgnoreCase);
 
   // Force mozbrowser frames to always be typeContent, even if the
   // mozbrowser interfaces are disabled.
   nsCOMPtr<nsIDOMMozBrowserFrame> mozbrowser =
     do_QueryInterface(mOwnerContent);
   if (mozbrowser) {
     bool isMozbrowser = false;
     mozbrowser->GetMozbrowser(&isMozbrowser);
@@ -1004,18 +996,19 @@ nsFrameLoader::AddTreeItemToTreeOwner(ns
   if (aParentNode) {
     aParentNode->AddChild(aItem);
   }
 
   bool retval = false;
   if (aParentType == nsIDocShellTreeItem::typeChrome && isContent) {
     retval = true;
 
-    bool is_primary = value.LowerCaseEqualsLiteral("content-primary");
-
+    bool is_primary =
+      mOwnerContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::primary,
+                                 nsGkAtoms::_true, eIgnoreCase);
     if (aOwner) {
       mOwnerContent->AddMutationObserver(this);
       mObservingOwnerContent = true;
       aOwner->ContentShellAdded(aItem, is_primary);
     }
   }
 
   return retval;
@@ -2862,22 +2855,18 @@ nsFrameLoader::TryRemoteBrowser()
         return false;
       }
     }
 
     if (!mOwnerContent->IsXULElement()) {
       return false;
     }
 
-    nsAutoString value;
-    mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, value);
-
-    if (!value.LowerCaseEqualsLiteral("content") &&
-        !StringBeginsWith(value, NS_LITERAL_STRING("content-"),
-                          nsCaseInsensitiveStringComparator())) {
+    if (!mOwnerContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                                    nsGkAtoms::content, eIgnoreCase)) {
       return false;
     }
 
     // Try to get the related content parent from our browser element.
     openerContentParent = GetContentParent(mOwnerContent);
   }
 
   uint32_t chromeFlags = 0;
@@ -3278,17 +3267,18 @@ nsFrameLoader::AttributeChanged(nsIDocum
                                 mozilla::dom::Element* aElement,
                                 int32_t      aNameSpaceID,
                                 nsIAtom*     aAttribute,
                                 int32_t      aModType,
                                 const nsAttrValue* aOldValue)
 {
   MOZ_ASSERT(mObservingOwnerContent);
 
-  if (aNameSpaceID != kNameSpaceID_None || aAttribute != TypeAttrName()) {
+  if (aNameSpaceID != kNameSpaceID_None ||
+      (aAttribute != TypeAttrName() && aAttribute != nsGkAtoms::primary)) {
     return;
   }
 
   if (aElement != mOwnerContent) {
     return;
   }
 
   // Note: This logic duplicates a lot of logic in
@@ -3313,35 +3303,30 @@ nsFrameLoader::AttributeChanged(nsIDocum
   }
 
   nsCOMPtr<nsIDocShellTreeOwner> parentTreeOwner;
   parentItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));
   if (!parentTreeOwner) {
     return;
   }
 
-  nsAutoString value;
-  aElement->GetAttr(kNameSpaceID_None, TypeAttrName(), value);
-
-  bool is_primary = value.LowerCaseEqualsLiteral("content-primary");
+  bool is_primary =
+    aElement->AttrValueIs(kNameSpaceID_None, nsGkAtoms::primary, nsGkAtoms::_true, eIgnoreCase);
 
 #ifdef MOZ_XUL
   // when a content panel is no longer primary, hide any open popups it may have
   if (!is_primary) {
     nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
     if (pm)
       pm->HidePopupsInDocShell(mDocShell);
   }
 #endif
 
   parentTreeOwner->ContentShellRemoved(mDocShell);
-  if (value.LowerCaseEqualsLiteral("content") ||
-      StringBeginsWith(value, NS_LITERAL_STRING("content-"),
-                       nsCaseInsensitiveStringComparator())) {
-
+  if (aElement->AttrValueIs(kNameSpaceID_None, TypeAttrName(), nsGkAtoms::content, eIgnoreCase)) {
     parentTreeOwner->ContentShellAdded(mDocShell, is_primary);
   }
 }
 
 /**
  * Send the RequestNotifyAfterRemotePaint message to the current Tab.
  */
 NS_IMETHODIMP
@@ -3541,20 +3526,18 @@ nsFrameLoader::MaybeUpdatePrimaryTabPare
     if (!mObservingOwnerContent) {
       mOwnerContent->AddMutationObserver(this);
       mObservingOwnerContent = true;
     }
 
     parentTreeOwner->TabParentRemoved(mRemoteBrowser);
     if (aChange == eTabParentChanged) {
       bool isPrimary =
-        mOwnerContent->AttrValueIs(kNameSpaceID_None,
-                                   TypeAttrName(),
-                                   NS_LITERAL_STRING("content-primary"),
-                                   eIgnoreCase);
+        mOwnerContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::primary,
+                                   nsGkAtoms::_true, eIgnoreCase);
       parentTreeOwner->TabParentAdded(mRemoteBrowser, isPrimary);
     }
   }
 }
 
 nsresult
 nsFrameLoader::GetNewTabContext(MutableTabContext* aTabContext,
                                 nsIURI* aURI)
--- a/dom/base/test/chrome/file_bug1209621.xul
+++ b/dom/base/test/chrome/file_bug1209621.xul
@@ -25,53 +25,53 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   function run() {
     var docshell = window.getInterface(Ci.nsIDocShell);
     ok(docshell, "Active window should have a DocShell");
     var treeOwner = docshell.treeOwner;
     ok(treeOwner, "Active docshell should have a TreeOwner!");
 
     is(treeOwner.primaryContentShell, null,
-       "There shouldn't be primaryContentShell because no browser has type=content-primary.");
+       "There shouldn't be primaryContentShell because no browser has primary=true.");
     is(treeOwner.primaryTabParent, null,
-       "There shouldn't be primaryTabParent because no remote browser has type=content-primary.");
+       "There shouldn't be primaryTabParent because no remote browser has primary=true.");
 
     var ip = document.getElementById("inprocess");
     var remote = document.getElementById("remote");
     var remote2 = document.getElementById("remote2");
 
-    ip.setAttribute("type", "content-primary");
+    ip.setAttribute("primary", "true");
     ok(ip.docShell, "non-remote browser should have a DocShell.");
     is(treeOwner.primaryContentShell, ip.docShell,
-       "content-primary browser should be the primaryContentShell.");
+       "primary browser should be the primaryContentShell.");
     is(treeOwner.primaryTabParent, null,
-       "There shouldn't be primaryTabParent because no remote browser has type=content-primary.");
+       "There shouldn't be primaryTabParent because no remote browser has primary=true.");
 
-    ip.setAttribute("type", "content");
-    remote.setAttribute("type", "content-primary");
+    ip.removeAttribute("primary");
+    remote.setAttribute("primary", "true");
     is(treeOwner.primaryContentShell, null,
-       "There shouldn't be primaryContentShell because no browser has type=content-primary.");
+       "There shouldn't be primaryContentShell because no browser has primary=true.");
     var tp = remote.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader.tabParent;
     ok(tp, "Remote browsers should have a TabParent.");
     is(treeOwner.primaryTabParent, tp,
-       "content-primary remote browser should be the primaryTabParent.");
+       "primary remote browser should be the primaryTabParent.");
 
-    remote.setAttribute("type", "content");
+    remote.removeAttribute("primary");
     is(treeOwner.primaryContentShell, null,
-       "There shouldn't be primaryContentShell because no browser has type=content-primary.");
+       "There shouldn't be primaryContentShell because no browser has primary=true.");
     is(treeOwner.primaryTabParent, null,
-       "There shouldn't be primaryTabParent because no remote browser has type=content-primary.");
+       "There shouldn't be primaryTabParent because no remote browser has primary=true.");
 
-    remote2.setAttribute("type", "content-primary");
+    remote2.setAttribute("primary", "true");
     var tp2 = remote2.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader.tabParent;
     ok(tp2, "Remote browsers should have a TabParent.");
     is(treeOwner.primaryTabParent, tp2,
-       "content-primary remote browser should be the primaryTabParent.");
+       "primary remote browser should be the primaryTabParent.");
     is(treeOwner.primaryContentShell, null,
-       "There shouldn't be primaryContentShell because no browser has type=content-primary.");
+       "There shouldn't be primaryContentShell because no browser has primary=true.");
 
     opener.setTimeout("done()", 0);
     window.close();
   }
 
   ]]></script>
   <browser type="content" src="about:blank" id="inprocess"/>
   <browser type="content" remote="true" src="about:blank" id="remote"/>
--- a/dom/events/test/window_bug617528.xul
+++ b/dom/events/test/window_bug617528.xul
@@ -1,9 +1,9 @@
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         width="640" height="480">
 
-  <browser id="browser" type="content-primary" flex="1" src="about:blank"
+  <browser id="browser" type="content" primary="true" flex="1" src="about:blank"
            disablehistory="true" disablesecurity="true"/>
 
 </window>
--- a/dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xul
+++ b/dom/plugins/test/mochitest/xulbrowser_plugin_visibility.xul
@@ -5,18 +5,18 @@
 	orient="vertical">
 
   <tabbox id="tabbox" flex="1">
     <tabs>
       <tab id="tab1" label="Tab 1" />
       <tab id="tab2" label="Tab 2" />
     </tabs>
     <tabpanels flex="1">
-      <browser id="browser1" type="content-primary" flex="1" src="about:blank"/>
-      <browser id="browser2" type="content-primary" flex="1" src="about:blank"/>
+      <browser id="browser1" type="content" primary="true" flex="1" src="about:blank"/>
+      <browser id="browser2" type="content" primary="true" flex="1" src="about:blank"/>
     </tabpanels>
   </tabbox>
   <script type="application/javascript" src="plugin-utils.js"/>
   <script type="application/javascript"><![CDATA[
     const ok = window.opener.wrappedJSObject.ok;
     const is = window.opener.wrappedJSObject.is;
     const done = window.opener.wrappedJSObject.done;
     const SimpleTest = window.opener.wrappedJSObject.SimpleTest;
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -1604,20 +1604,20 @@ nsXULElement::LoadSrc()
         return NS_OK;
     }
     RefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
     if (!frameLoader) {
         // Check if we have an opener we need to be setting
         nsXULSlots* slots = static_cast<nsXULSlots*>(Slots());
         nsCOMPtr<nsPIDOMWindowOuter> opener = do_QueryInterface(slots->mFrameLoaderOrOpener);
         if (!opener) {
-            // If we are a content-primary xul-browser, we want to take the opener property!
+            // If we are a primary xul-browser, we want to take the opener property!
             nsCOMPtr<nsIDOMChromeWindow> chromeWindow = do_QueryInterface(OwnerDoc()->GetWindow());
-            if (AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
-                            NS_LITERAL_STRING("content-primary"), eIgnoreCase) &&
+            if (AttrValueIs(kNameSpaceID_None, nsGkAtoms::primary,
+                            nsGkAtoms::_true, eIgnoreCase) &&
                 chromeWindow) {
                 nsCOMPtr<mozIDOMWindowProxy> wp;
                 chromeWindow->TakeOpenerForInitialContentBrowser(getter_AddRefs(wp));
                 opener = nsPIDOMWindowOuter::From(wp);
             }
         }
 
         // false as the last parameter so that xul:iframe/browser/editor
--- a/editor/composer/test/test_bug434998.xul
+++ b/editor/composer/test/test_bug434998.xul
@@ -14,17 +14,18 @@ https://bugzilla.mozilla.org/show_bug.cg
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=434998"
      target="_blank">Mozilla Bug 434998</a>
   <p/>
   <editor xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           id="editor"
-          type="content-primary"
+          type="content"
+          primary="true"
           editortype="html"
           style="width: 400px; height: 100px; border: thin solid black"/>
   <p/>
   <pre id="test">
   </pre>
   </body>
   <script class="testbody" type="application/javascript">
   <![CDATA[
--- a/editor/libeditor/tests/test_bug607584.xul
+++ b/editor/libeditor/tests/test_bug607584.xul
@@ -14,17 +14,18 @@ https://bugzilla.mozilla.org/show_bug.cg
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=607584"
      target="_blank">Mozilla Bug 607584</a>
   <p/>
   <editor xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           id="editor"
-          type="content-primary"
+          type="content"
+          primary="true"
           editortype="html"
           style="width: 400px; height: 100px; border: thin solid black"/>
   <p/>
   <pre id="test">
   </pre>
   </body>
   <script class="testbody" type="application/javascript">
   <![CDATA[
--- a/editor/libeditor/tests/test_bug780908.xul
+++ b/editor/libeditor/tests/test_bug780908.xul
@@ -16,17 +16,18 @@ adapted from test_bug607584.xul by Kent 
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=780908"
      target="_blank">Mozilla Bug 780908</a>
   <p/>
   <editor xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           id="editor"
-          type="content-primary"
+          type="content"
+          primary="true"
           editortype="html"
           style="width: 400px; height: 100px; border: thin solid black"/>
   <p/>
   <pre id="test">
   </pre>
   </body>
   <script class="testbody" type="application/javascript">
   <![CDATA[
--- a/layout/generic/test/file_bug514732_window.xul
+++ b/layout/generic/test/file_bug514732_window.xul
@@ -69,10 +69,10 @@
       } );
       yield;
 
       finish();
     }
     
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
 </window>
--- a/layout/reftests/bugs/558011-1-ref.xul
+++ b/layout/reftests/bugs/558011-1-ref.xul
@@ -3,12 +3,12 @@
 <window xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <hbox flex="1" style="direction: rtl;">
 <richlistbox style="width: 100px; direction: ltr;">
 <item>this is a really really really really long test sentence</item>
 </richlistbox>
 <splitter/>
-<browser flex="1" src="" type="content-primary"/>
+<browser flex="1" src="" type="content" primary="true"/>
 </hbox>
 
 </window>
--- a/layout/reftests/bugs/558011-1.xul
+++ b/layout/reftests/bugs/558011-1.xul
@@ -3,12 +3,12 @@
 <window xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <hbox flex="1" style="direction: rtl;">
 <richlistbox style="width: 100px; direction: rtl;">
 <item>this is a really really really really long test sentence</item>
 </richlistbox>
 <splitter/>
-<browser flex="1" src="" type="content-primary"/>
+<browser flex="1" src="" type="content" primary="true"/>
 </hbox>
 
 </window>
--- a/layout/tools/layout-debug/ui/content/layoutdebug.xul
+++ b/layout/tools/layout-debug/ui/content/layoutdebug.xul
@@ -172,16 +172,16 @@
                        oncommand="gBrowser.stop();" />
 
         <textbox id="urlbar" flex="1"
                  onkeypress="if (event.keyCode == 13)
                                gBrowser.loadURI(this.value);" />
       </toolbar>
     </toolbox>
 
-    <browser flex="1" id="browser" type="content-primary"
+    <browser flex="1" id="browser" type="content" primary="true"
              homepage="about:blank" />
 
     <hbox>
       <description id="status-text" value="" />
     </hbox>
   </vbox>
 </window>
--- a/layout/tools/recording/recording.xul
+++ b/layout/tools/recording/recording.xul
@@ -4,10 +4,10 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         id="recording-window"
         hidechrome="true"
         onload="OnRecordingLoad();"
         style="background:white; overflow:hidden; width:800px; height:600px;"
         >
     <script type="application/ecmascript" src="recording.js" />
-  <browser id="browser" type="content-primary" style="min-width: 1024px; min-height: 768px; max-width: 1024px; max-height: 768px"/>
+  <browser id="browser" type="content" primary="true" style="min-width: 1024px; min-height: 768px; max-width: 1024px; max-height: 768px"/>
 </window>
--- a/layout/tools/reftest/reftest.jsm
+++ b/layout/tools/reftest/reftest.jsm
@@ -309,17 +309,18 @@ this.OnRefTestLoad = function OnRefTestL
     if (gBrowserIsIframe) {
       gBrowser = gContainingWindow.document.createElementNS(XHTML_NS, "iframe");
       gBrowser.setAttribute("mozbrowser", "");
     } else {
       gBrowser = gContainingWindow.document.createElementNS(XUL_NS, "xul:browser");
       gBrowser.setAttribute("class", "lightweight");
     }
     gBrowser.setAttribute("id", "browser");
-    gBrowser.setAttribute("type", "content-primary");
+    gBrowser.setAttribute("type", "content");
+    gBrowser.setAttribute("primary", "true");
     gBrowser.setAttribute("remote", gBrowserIsRemote ? "true" : "false");
     // Make sure the browser element is exactly 800x1000, no matter
     // what size our window is
     gBrowser.setAttribute("style", "padding: 0px; margin: 0px; border:none; min-width: 800px; min-height: 1000px; max-width: 800px; max-height: 1000px");
 
     if (Services.appinfo.OS == "Android") {
       let doc;
       if (Services.appinfo.widgetToolkit == "gonk") {
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3660,23 +3660,23 @@ Tab.prototype = {
   // This should be called to update the browser when the tab gets selected/unselected
   setActive: function setActive(aActive) {
     if (!this.browser || !this.browser.docShell)
       return;
 
     this.lastTouchedAt = Date.now();
 
     if (aActive) {
-      this.browser.setAttribute("type", "content-primary");
+      this.browser.setAttribute("primary", "true");
       this.browser.focus();
       this.browser.docShellIsActive = true;
       Reader.updatePageAction(this);
       ExternalApps.updatePageAction(this.browser.currentURI, this.browser.contentDocument);
     } else {
-      this.browser.setAttribute("type", "content");
+      this.browser.removeAttribute("primary");
       this.browser.docShellIsActive = false;
       this.browser.blur();
     }
   },
 
   getActive: function getActive() {
     return this.browser.docShellIsActive;
   },
--- a/mobile/android/chrome/content/geckoview.xul
+++ b/mobile/android/chrome/content/geckoview.xul
@@ -5,12 +5,12 @@
 
 <?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
 
 <window id="main-window"
         onload="startup();"
         windowtype="navigator:browser"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <browser id="content" type="content-primary" src="https://mozilla.com" flex="1" remote="true"/>
+  <browser id="content" type="content" primary="true" src="https://mozilla.com" flex="1" remote="true"/>
 
   <script type="application/javascript" src="chrome://browser/content/geckoview.js"/>
 </window>
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -15,17 +15,17 @@
  *
  * To compound that, we need to support remote browsers, and that means
  * kicking off the print jobs in the content process. This means we send
  * messages back and forth to that process. browser-content.js contains
  * the object that listens and responds to the messages that PrintUtils
  * sends.
  *
  * This also means that <xul:browser>'s that hope to use PrintUtils must have
- * their type attribute set to either "content" or "content-primary".
+ * their type attribute set to "content".
  *
  * PrintUtils sends messages at different points in its implementation, but
  * their documentation is consolidated here for ease-of-access.
  *
  *
  * Messages sent:
  *
  *   Printing:Print
@@ -160,23 +160,22 @@ var PrintUtils = {
   /**
    * Initializes print preview.
    *
    * @param aListenerObj
    *        An object that defines the following functions:
    *
    *        getPrintPreviewBrowser:
    *          Returns the <xul:browser> to display the print preview in. This
-   *          <xul:browser> must have its type attribute set to "content" or
-   *          "content-primary".
+   *          <xul:browser> must have its type attribute set to "content".
    *
    *        getSourceBrowser:
    *          Returns the <xul:browser> that contains the document being
    *          printed. This <xul:browser> must have its type attribute set to
-   *          "content" or "content-primary".
+   *          "content".
    *
    *        getNavToolbox:
    *          Returns the primary toolbox for this window.
    *
    *        onEnter:
    *          Called upon entering print preview.
    *
    *        onExit:
--- a/toolkit/components/viewsource/content/viewPartialSource.xul
+++ b/toolkit/components/viewsource/content/viewPartialSource.xul
@@ -150,14 +150,14 @@
           <menuitem type="checkbox" id="menu_highlightSyntax" command="cmd_highlightSyntax"
                     label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
         </menupopup>
       </menu>
     </menubar>
   </toolbox>
 
   <vbox id="appcontent" flex="1">
-    <browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
+    <browser id="content" type="content" primary="true" name="content" src="about:blank" flex="1"
              disablehistory="true" context="viewSourceContextMenu" />
     <findbar id="FindToolbar" browserid="content"/>
   </vbox>
 
 </window>
--- a/toolkit/components/viewsource/content/viewSource.xul
+++ b/toolkit/components/viewsource/content/viewSource.xul
@@ -218,17 +218,18 @@
                     label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
         </menupopup>
       </menu>
     </menubar>
   </toolbox>
 
   <vbox id="appcontent" flex="1">
 
-    <browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
+    <browser id="content" type="content" name="content" src="about:blank" flex="1"
+             primary="true"
              context="viewSourceContextMenu" showcaret="true" tooltip="aHTMLTooltip" />
     <findbar id="FindToolbar" browserid="content"/>
   </vbox>
 
   <statusbar id="status-bar" class="chromeclass-status">
     <statusbarpanel id="statusbar-line-col" label="" flex="1"/>
   </statusbar>
 
--- a/toolkit/content/tests/chrome/bug263683_window.xul
+++ b/toolkit/content/tests/chrome/bug263683_window.xul
@@ -223,12 +223,12 @@
         content.document.documentElement.focus();
       });
 
       gFindBar.close(true);
       yield new Promise(resolve => setTimeout(resolve, kIteratorTimeout));
     }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
-  <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content-remote" remote="true" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/bug304188_window.xul
+++ b/toolkit/content/tests/chrome/bug304188_window.xul
@@ -83,12 +83,12 @@ find-menu appears in editor element whic
           event.initKeyEvent("keypress", true, true, null, false, false,
                              false, false, 0, args.charCode);
           content.document.body.dispatchEvent(event);
         });
       }
     }
   ]]></script>
 
-  <browser id="content" flex="1" src="about:blank" type="content-primary"/>
-  <browser id="content-remote" remote="true" flex="1" src="about:blank" type="content-primary"/>
+  <browser id="content" flex="1" src="about:blank" type="content" primary="true"/>
+  <browser id="content-remote" remote="true" flex="1" src="about:blank" type="content" primary="true"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/bug331215_window.xul
+++ b/toolkit/content/tests/chrome/bug331215_window.xul
@@ -94,12 +94,12 @@
         yield promise;
       }
     }
   ]]></script>
 
   <commandset>
     <command id="cmd_find" oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
   </commandset>
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
-  <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content-remote" remote="true" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/bug360437_window.xul
+++ b/toolkit/content/tests/chrome/bug360437_window.xul
@@ -109,12 +109,12 @@
         event.initKeyEvent("keypress", true, true, null, false, false,
                            false, false, 0, str.charCodeAt(i));
         gFindBar._findField.inputField.dispatchEvent(event);
       }
       return promise;
     }
   ]]></script>
   <textbox id="textbox"/>
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
-  <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content-remote" remote="true" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/bug409624_window.xul
+++ b/toolkit/content/tests/chrome/bug409624_window.xul
@@ -88,11 +88,11 @@
       gFindBar.close();
 
       finish();
     }
 
     SimpleTest.waitForFocus(startTest, window);
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/bug429723_window.xul
+++ b/toolkit/content/tests/chrome/bug429723_window.xul
@@ -74,11 +74,11 @@
       ok(notRed, "Find Bar textbox is correct colour");
       finish();
     }
   ]]></script>
 
   <commandset>
     <command id="cmd_find" oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
   </commandset>
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/bug451540_window.xul
+++ b/toolkit/content/tests/chrome/bug451540_window.xul
@@ -228,12 +228,12 @@
         window.close();
         SimpleTest.finish();
       });
     }
 
     SimpleTest.waitForFocus(startTest, window);
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
-  <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content-remote" remote="true" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/findbar_entireword_window.xul
+++ b/toolkit/content/tests/chrome/findbar_entireword_window.xul
@@ -262,12 +262,12 @@
 
       gFindBar.close();
     }
   ]]></script>
 
   <commandset>
     <command id="cmd_find" oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
   </commandset>
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
-  <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content-remote" remote="true" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/findbar_events_window.xul
+++ b/toolkit/content/tests/chrome/findbar_events_window.xul
@@ -168,12 +168,12 @@
       yield checkSelection();
 
       // Toggle it back to the original setting.
       if (highlightButton.checked)
         highlightButton.click();
     }
   ]]></script>
 
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
-  <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content-remote" remote="true" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/chrome/findbar_window.xul
+++ b/toolkit/content/tests/chrome/findbar_window.xul
@@ -765,12 +765,12 @@
       check.click();
       gFindBar.close(true);
     }
   ]]></script>
 
   <commandset>
     <command id="cmd_find" oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
   </commandset>
-  <browser type="content-primary" flex="1" id="content" src="about:blank"/>
-  <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
+  <browser type="content" primary="true" flex="1" id="content-remote" remote="true" src="about:blank"/>
   <findbar id="FindToolbar" browserid="content"/>
 </window>
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
@@ -404,17 +404,18 @@ function() {
         this.discardAllBatchOperations();
 
         currentBrowser.setAttribute("type", "content");
         currentBrowser.docShell.isOffScreenBrowser = false;
       }
 
       this._restoreBrowser(browser);
 
-      browser.setAttribute("type", "content-primary");
+      browser.setAttribute("type", "content");
+      browser.setAttribute("primary", "true");
 
       this.beginBatchOperation();
 
       browser.addEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
 
       // !!! --- RESIZE HACK BEGIN -----
       // change to the real event type and perhaps refactor the handler function name
       browser.addEventListener("FakeMozAfterSizeChange", this.handleMozAfterSizeChange, false);
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
@@ -208,17 +208,18 @@ BrowserView.prototype = {
       currentBrowser.mPanY = ws._viewingRect.y;
 
       // stop monitor paint events for this browser
       currentBrowser.removeEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
       currentBrowser.setAttribute("type", "content");
       currentBrowser.docShell.isOffScreenBrowser = false;
     }
 
-    browser.setAttribute("type", "content-primary");
+    browser.setAttribute("type", "content");
+    browser.setAttribute("primary", "true");
     if (!skipZoom)
       browser.docShell.isOffScreenBrowser = true;
 
     // start monitoring paint events for this browser
     browser.addEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
 
     this._browser = browser;