~ubuntu-branches/ubuntu/trusty/fennec/trusty

« back to all changes in this revision

Viewing changes to mobile/chrome/tests/browser_mainui.js

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2011-01-26 20:31:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110126203140-zcg54f8ost2vmrxr
Tags: 4.0~b3-0ubuntu1
* New upstream release v4.0 B3 (FENNEC_4_0b3_RELEASE)

* Update build-depends for xulrunner-2.0
  - update debian/control
* Update mozclient to point to the mobile-browser repo
  - update debian/mozclient/fennec.conf
* Build with "--with-system-libxul"
  - update debian/rules
* Add launcher script, based on the one used in Firefox but with the
  unnecessary bits stripped out
  - add debian/fennec.sh
  - update debian/rules
* Refresh patches for new version
  - update debian/patches/bump_gecko_versions_in_application.ini.patch
  - update debian/patches/ubuntu_codes_google.patch
  - update debian/patches/installer.patch
* Drop unneeded patches
  - remove debian/patches/nspr_flags_by_pkg_config_hack.patch
  - remove debian/patches/xul191_l10n.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
// Entry point (must be named "test")
8
8
function test() {
9
9
  is(window.location.href, "chrome://browser/content/browser.xul", "Main window should be browser.xul");
10
 
  
 
10
 
11
11
  window.focus();
12
 
  
 
12
 
13
13
  let browser = Browser.selectedBrowser;
14
14
  isnot(browser, null, "Should have a browser");
15
 
  
 
15
 
16
16
  is(browser.currentURI.spec, Browser.selectedTab.browser.currentURI.spec, "selectedBrowser == selectedTab.browser");
17
 
  
 
17
 
18
18
  testContentContainerSize();
19
19
}
20
20
 
21
21
function testContentContainerSize() {
22
 
  let tiles = document.getElementById("tile-container");
23
 
  let oldtilesstyle = tiles.getAttribute("style");
 
22
  let container = document.getElementById("content-viewport");
24
23
 
25
 
  try {
26
 
    tiles.style.width = (window.innerWidth + 100) + "px";
27
 
    tiles.style.height = (window.innerHeight + 100) + "px";
28
 
    let container = Browser.contentScrollbox;
29
 
    let rect = container.getBoundingClientRect();
30
 
    ok(rect.width == window.innerWidth, "Content container is same width as window");
31
 
    ok(rect.height == window.innerHeight, "Content container is same height as window");
32
 
  }
33
 
  finally {
34
 
    tiles.setAttribute("style", oldtilesstyle);
35
 
  }
 
24
  let rect = container.getBoundingClientRect();
 
25
  is(rect.width, window.innerWidth, "Content container is same width as window");
 
26
  is(rect.height, window.innerHeight, "Content container is same height as window");
36
27
}