This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
landing frame, fullscreen, and no script which uses onload and page l…
…oad event. Fullscreen also uses a delay.
- Loading branch information
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
const m = require("main"); | ||
const timer = require("timer"); | ||
|
||
exports.testBrowser = function (test) { | ||
|
||
var callbacks = { | ||
|
||
onload: function () { | ||
var mainBrowser= m.getAppBrowser(); | ||
var mainDoc = mainBrowser.contentDocument; | ||
var appWindow = m.getAppWindow; | ||
|
||
mainBrowser.contentWindow.addEventListener("load", function pageLoaded() { | ||
|
||
test.assert( mainDoc.location != mainDoc.getElementById("inner").contentDocument.location); | ||
test.done(); | ||
|
||
},false); | ||
|
||
}, | ||
|
||
quit: function() { | ||
test.pass(); | ||
test.done(); | ||
} | ||
|
||
}; | ||
|
||
test.waitUntilDone(); | ||
m.main( options, callbacks); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
const m = require("main"); | ||
const timer = require("timer"); | ||
|
||
exports.testBrowser = function (test) { | ||
|
||
var callbacks = { | ||
|
||
onload: function () { | ||
var mainBrowser= m.getAppBrowser(); | ||
var mainWin = mainBrowser.contentWindow; | ||
|
||
var originalWidth = mainWin.innerWidth; | ||
mainWin.addEventListener("load", function pageLoaded() { | ||
timer.setTimeout(function delayedTest() { | ||
var currentWidth = mainWin.innerWidth; | ||
test.assert( originalWidth != currentWidth); | ||
test.done(); | ||
},500); | ||
},false); | ||
|
||
}, | ||
|
||
quit: function() { | ||
test.pass(); | ||
test.done(); | ||
} | ||
|
||
}; | ||
|
||
test.waitUntilDone(); | ||
m.main( options, callbacks); | ||
} | ||
|
||
function delayedTest() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
const m = require("main"); | ||
const timer = require("timer"); | ||
|
||
exports.testBrowser = function (test) { | ||
|
||
var callbacks = { | ||
|
||
onload: function () { | ||
var mainBrowser= m.getAppBrowser(); | ||
var mainDoc = mainBrowser.contentDocument; | ||
mainBrowser.contentWindow.addEventListener("load", function pageLoaded() { | ||
test.assert( mainDoc.getElementById("inner").contentDocument.getElementById("posterousbar_nojs") == null); | ||
test.done(); | ||
},false); | ||
}, | ||
|
||
quit: function() { | ||
test.pass(); | ||
test.done(); | ||
} | ||
|
||
}; | ||
|
||
test.waitUntilDone(); | ||
m.main( options, callbacks); | ||
} |