1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/tabview/test/browser_tabview_bug629189.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +function test() { 1.8 + let {Rect} = Components.utils.import("resource:///modules/tabview/utils.jsm", {}); 1.9 + 1.10 + let referenceRect = new Rect(50,50,150,150); 1.11 + let rect = new Rect(100,100,100,100); 1.12 + 1.13 + ok(referenceRect.contains(referenceRect), "A rect contains itself"); 1.14 + ok(referenceRect.contains(rect), "[50,50,150,150] contains [100,100,100,100]"); 1.15 + rect.inset(-1,-1); 1.16 + ok(!referenceRect.contains(rect), "Now it grew and [50,50,150,150] doesn't contain [99,99,102,102]"); 1.17 +}