Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3148)

Unified Diff: chrome/test/data/extensions/api_test/processes/api/test.js

Issue 1584473004: Migrate ProcessesEventRouter to the new task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/processes/api/test.js
diff --git a/chrome/test/data/extensions/api_test/processes/api/test.js b/chrome/test/data/extensions/api_test/processes/api/test.js
index edd4f277fc23e353c76fb67802b5e6f414459ea2..a4ceb52e7bac159ee99a3247639668e842578f26 100644
--- a/chrome/test/data/extensions/api_test/processes/api/test.js
+++ b/chrome/test/data/extensions/api_test/processes/api/test.js
@@ -29,11 +29,15 @@ function pageUrl(letter) {
function dumpProcess(process) {
console.log("id " + process.id);
- console.log("title " + process.title);
console.log("osProcId " + process.osProcessId);
console.log("type " + process.type);
console.log("profile " + process.profile);
- console.log("tabs " + process.tabs);
+ console.log("tasks " + process.tasks);
+ for (var i = 0; i < process.tasks.length; ++i) {
+ console.log("task["+ i + "].title " + process.tasks[i].title);
+ if ("tabId" in process.tasks[i])
+ console.log("task["+ i + "].tabId " + process.tasks[i].tabId);
+ }
console.log("cpu " + process.cpu);
console.log("privMem " + process.privateMemory);
console.log("network " + process.network);
@@ -58,12 +62,12 @@ function dumpProcess(process) {
function validateProcessProperties(process, updating, memory_included) {
// Always present.
assertTrue("id" in process);
- assertTrue("title" in process);
assertTrue("naclDebugPort" in process);
assertTrue("osProcessId" in process);
assertTrue("type" in process);
assertTrue("profile" in process);
- assertTrue("tabs" in process);
+ assertTrue("tasks" in process);
+ assertTrue("title" in process.tasks[0]);
// Present if onUpdate(WithMemory) listener is registered.
assertEq(("cpu" in process), updating);
@@ -146,9 +150,9 @@ chrome.test.runTests([
function (pl2) {
var proc1 = pl1[pid1];
var proc2 = pl2[pid2];
- assertTrue(proc1.tabs.length == proc2.tabs.length);
- for (var i = 0; i < proc1.tabs.length; ++i) {
- assertEq(proc1.tabs[i], proc2.tabs[i]);
+ assertTrue(proc1.tasks.length == proc2.tasks.length);
+ for (var i = 0; i < proc1.tasks.length; ++i) {
+ assertEq(proc1.tasks[i], proc2.tasks[i]);
}
});
});
@@ -261,13 +265,15 @@ chrome.test.runTests([
function testOnCreated() {
listenOnce(chrome.processes.onCreated, function(process) {
assertTrue("id" in process, "process doesn't have id property");
+ // We don't report the creation of the browser process, hence process.id
+ // is expected to be > 0.
assertTrue(process.id > 0, "id is not positive " + process.id);
});
createTab(5, "chrome://newtab/");
},
// DISABLED: crbug.com/345411
- // Hangs consistently.
+ // Hangs consistently (On Windows).
/*
function testOnExited() {
listenOnce(chrome.processes.onExited,

Powered by Google App Engine
This is Rietveld 408576698