Bug 1167963 - FrameNode should not export `isContent`, r=jsantell

This commit is contained in:
Victor Porof 2015-05-24 12:12:20 -04:00
Родитель c975de6e98
Коммит 4dea7e637d
3 изменённых файлов: 26 добавлений и 26 удалений

Просмотреть файл

@ -501,4 +501,3 @@ FrameNode.prototype = {
exports.ThreadNode = ThreadNode;
exports.FrameNode = FrameNode;
exports.FrameNode.isContent = FrameUtils.isContent;

Просмотреть файл

@ -7,44 +7,44 @@
*/
function test() {
let { FrameNode } = devtools.require("devtools/performance/tree-model");
let FrameUtils = devtools.require("devtools/performance/frame-utils");
ok(FrameNode.isContent({ location: "http://foo" }),
ok(FrameUtils.isContent({ location: "http://foo" }),
"Verifying content/chrome frames is working properly.");
ok(FrameNode.isContent({ location: "https://foo" }),
ok(FrameUtils.isContent({ location: "https://foo" }),
"Verifying content/chrome frames is working properly.");
ok(FrameNode.isContent({ location: "file://foo" }),
ok(FrameUtils.isContent({ location: "file://foo" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ location: "chrome://foo" }),
ok(!FrameUtils.isContent({ location: "chrome://foo" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ location: "resource://foo" }),
ok(!FrameUtils.isContent({ location: "resource://foo" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ location: "chrome://foo -> http://bar" }),
ok(!FrameUtils.isContent({ location: "chrome://foo -> http://bar" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ location: "chrome://foo -> https://bar" }),
ok(!FrameUtils.isContent({ location: "chrome://foo -> https://bar" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ location: "chrome://foo -> file://bar" }),
ok(!FrameUtils.isContent({ location: "chrome://foo -> file://bar" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ location: "resource://foo -> http://bar" }),
ok(!FrameUtils.isContent({ location: "resource://foo -> http://bar" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ location: "resource://foo -> https://bar" }),
ok(!FrameUtils.isContent({ location: "resource://foo -> https://bar" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ location: "resource://foo -> file://bar" }),
ok(!FrameUtils.isContent({ location: "resource://foo -> file://bar" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ category: 1, location: "chrome://foo" }),
ok(!FrameUtils.isContent({ category: 1, location: "chrome://foo" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ category: 1, location: "resource://foo" }),
ok(!FrameUtils.isContent({ category: 1, location: "resource://foo" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ category: 1, location: "file://foo -> http://bar" }),
ok(!FrameUtils.isContent({ category: 1, location: "file://foo -> http://bar" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ category: 1, location: "file://foo -> https://bar" }),
ok(!FrameUtils.isContent({ category: 1, location: "file://foo -> https://bar" }),
"Verifying content/chrome frames is working properly.");
ok(!FrameNode.isContent({ category: 1, location: "file://foo -> file://bar" }),
ok(!FrameUtils.isContent({ category: 1, location: "file://foo -> file://bar" }),
"Verifying content/chrome frames is working properly.");
finish();

Просмотреть файл

@ -6,13 +6,14 @@
*/
function test() {
let FrameUtils = devtools.require("devtools/performance/frame-utils");
let { FrameNode } = devtools.require("devtools/performance/tree-model");
let { CATEGORY_OTHER } = devtools.require("devtools/performance/global");
let frame1 = new FrameNode("hello/<.world (http://foo/bar.js:123:987)", {
location: "hello/<.world (http://foo/bar.js:123:987)",
line: 456,
isContent: FrameNode.isContent({
isContent: FrameUtils.isContent({
location: "hello/<.world (http://foo/bar.js:123:987)"
})
}, false);
@ -39,7 +40,7 @@ function test() {
let frame2 = new FrameNode("hello/<.world (http://foo/bar.js#baz:123:987)", {
location: "hello/<.world (http://foo/bar.js#baz:123:987)",
line: 456,
isContent: FrameNode.isContent({
isContent: FrameUtils.isContent({
location: "hello/<.world (http://foo/bar.js#baz:123:987)"
})
}, false);
@ -66,7 +67,7 @@ function test() {
let frame3 = new FrameNode("hello/<.world (http://foo/#bar:123:987)", {
location: "hello/<.world (http://foo/#bar:123:987)",
line: 456,
isContent: FrameNode.isContent({
isContent: FrameUtils.isContent({
location: "hello/<.world (http://foo/#bar:123:987)"
})
}, false);
@ -93,7 +94,7 @@ function test() {
let frame4 = new FrameNode("hello/<.world (http://foo/:123:987)", {
location: "hello/<.world (http://foo/:123:987)",
line: 456,
isContent: FrameNode.isContent({
isContent: FrameUtils.isContent({
location: "hello/<.world (http://foo/:123:987)"
})
}, false);
@ -120,7 +121,7 @@ function test() {
let frame5 = new FrameNode("hello/<.world (resource://foo.js -> http://bar/baz.js:123:987)", {
location: "hello/<.world (resource://foo.js -> http://bar/baz.js:123:987)",
line: 456,
isContent: FrameNode.isContent({
isContent: FrameUtils.isContent({
location: "hello/<.world (resource://foo.js -> http://bar/baz.js:123:987)"
})
}, false);
@ -148,7 +149,7 @@ function test() {
location: "Foo::Bar::Baz",
line: 456,
category: CATEGORY_OTHER,
isContent: FrameNode.isContent({
isContent: FrameUtils.isContent({
location: "Foo::Bar::Baz",
category: CATEGORY_OTHER
})
@ -173,7 +174,7 @@ function test() {
let frame7 = new FrameNode("EnterJIT", {
location: "EnterJIT",
isContent: FrameNode.isContent({
isContent: FrameUtils.isContent({
location: "EnterJIT"
})
}, false);
@ -217,7 +218,7 @@ function test() {
let frame10 = new FrameNode("main (http://localhost:8888/file.js:123:987)", {
location: "main (http://localhost:8888/file.js:123:987)",
line: 123,
isContent: FrameNode.isContent({
isContent: FrameUtils.isContent({
location: "main (http://localhost:8888/file.js:123:987)"
})
}, false);