Skip to content
Permalink
Browse files
2010-04-14 Mikhail Naganov <mnaganov@chromium.org>
        Reviewed by Pavel Feldman.

        Re-write testProfilerTab to match the new implementation.

        https://bugs.webkit.org/show_bug.cgi?id=37516

        * src/js/Tests.js:
        (.TestSuite.prototype.testProfilerTab.findDisplayedNode):
        (.TestSuite.prototype.testProfilerTab.findVisibleView):
        (.TestSuite.prototype.testProfilerTab):

Canonical link: https://commits.webkit.org/48859@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Apr 14, 2010
1 parent 16ad5c1 commit 2cafcad223ae891c52f34d72ea1a5621bdeaf586
Showing 2 changed files with 42 additions and 34 deletions.
@@ -1,3 +1,16 @@
2010-04-14 Mikhail Naganov <mnaganov@chromium.org>

Reviewed by Pavel Feldman.

Re-write testProfilerTab to match the new implementation.

https://bugs.webkit.org/show_bug.cgi?id=37516

* src/js/Tests.js:
(.TestSuite.prototype.testProfilerTab.findDisplayedNode):
(.TestSuite.prototype.testProfilerTab.findVisibleView):
(.TestSuite.prototype.testProfilerTab):

2010-04-13 Timothy Hatcher <timothy@apple.com>

Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry.
@@ -421,49 +421,44 @@ TestSuite.prototype.testCachedResourceMimeType = function()
/**
* Tests that profiler works.
*/
/*
// FIXME: disable for now. Need to change js_test.html page in Chromium repo first.
TestSuite.prototype.testProfilerTab = function()
{
this.showPanel("profiles");

var panel = WebInspector.panels.profiles;
var test = this;
this.addSniffer(WebInspector.panels.profiles, "addProfileHeader",
function(typeOrProfile, profile) {
if (!profile)
profile = typeOrProfile;
var panel = WebInspector.panels.profiles;
panel.showProfile(profile);
var node = panel.visibleView.profileDataGridTree.children[0];
// Iterate over displayed functions and search for a function
// that is called "fib" or "eternal_fib". If found, it will mean
// that we actually have profiled page's code.
while (node) {
if (node.functionName.indexOf("fib") !== -1)
test.releaseControl();
node = node.traverseNextNode(true, null, true);
}

test.fail();
});
var ticksCount = 0;
var tickRecord = "\nt,";
this.addSniffer(RemoteProfilerAgent, "didGetLogLines",
function(posIgnored, log) {
var pos = 0;
while ((pos = log.indexOf(tickRecord, pos)) !== -1) {
pos += tickRecord.length;
ticksCount++;
}
if (ticksCount > 100)
InspectorBackend.stopProfiling();
}, true);
function findDisplayedNode() {
var node = panel.visibleView.profileDataGridTree.children[0];
if (!node) {
// Profile hadn't been queried yet, re-schedule.
window.setTimeout(findDisplayedNode, 100);
return;
}

// Iterate over displayed functions and search for a function
// that is called "fib" or "eternal_fib". If found, this will mean
// that we actually have profiled page's code.
while (node) {
if (node.functionName.indexOf("fib") !== -1)
test.releaseControl();
node = node.traverseNextNode(true, null, true);
}

test.fail();
}

function findVisibleView() {
if (!panel.visibleView) {
setTimeout(findVisibleView, 0);
return;
}
setTimeout(findDisplayedNode, 0);
}

InspectorBackend.startProfiling();
findVisibleView();
this.takeControl();
};
*/


/**

0 comments on commit 2cafcad

Please sign in to comment.