diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 19:00:16 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 19:00:16 +0000 |
commit | 25a9e26d3764cac4ae0faa251637001bc6dd882b (patch) | |
tree | a68adf944679aac8f194deee5e6f84e3b7194cdd | |
parent | 6e7b2d38c801b52ac129e6913b18e56c448dc0c9 (diff) | |
download | chromium_src-25a9e26d3764cac4ae0faa251637001bc6dd882b.zip chromium_src-25a9e26d3764cac4ae0faa251637001bc6dd882b.tar.gz chromium_src-25a9e26d3764cac4ae0faa251637001bc6dd882b.tar.bz2 |
Add a handful of startup tests that run with different types of installed extensions.
BUG=18445
TEST=no
Review URL: http://codereview.chromium.org/216019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26600 0039d316-1c4b-4281-b951-d872f2087c98
14 files changed, 506 insertions, 21 deletions
diff --git a/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json new file mode 100755 index 0000000..c7683c8 --- /dev/null +++ b/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json @@ -0,0 +1,8 @@ +{ + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDuUZGKCDbff6IRaxa4Pue7PPkxwPaNhGT3JEqppEsNWFjM80imEdqMbf3lrWqEfaHgaNku7nlpwPO1mu3/4Hr+XdNa5MhfnOnuPee4hyTLwOs3Vzz81wpbdzUxZSi2OmqMyI5oTaBYICfNHLwcuc65N5dbt6WKGeKgTpp4v7j7zwIDAQAB", + "version": "1.0.0.0", + "name": "1 content script", + "content_scripts": [ + { "matches": ["file://*"], "js": ["script1.js"] } + ] +} diff --git a/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/script.js b/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/script.js new file mode 100755 index 0000000..a7e6e1b --- /dev/null +++ b/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/script.js @@ -0,0 +1,4 @@ +// Useless script just to test injection. +var x = 1; +var y = 2; +var z = 3; diff --git a/chrome/test/data/extensions/profiles/content_scripts1/Default/Preferences b/chrome/test/data/extensions/profiles/content_scripts1/Default/Preferences new file mode 100755 index 0000000..6d477c9 --- /dev/null +++ b/chrome/test/data/extensions/profiles/content_scripts1/Default/Preferences @@ -0,0 +1,36 @@ +{ + "download": { + "directory_upgrade": true, + "extensions_to_open": "" + }, + "extensions": { + "autoupdate": { + "next_check": "12897640036342487" + }, + "settings": { + "behllobkkfkfnphdnhnkndlbkcpglgmj": { + "location": 1, + "manifest": + { + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDuUZGKCDbff6IRaxa4Pue7PPkxwPaNhGT3JEqppEsNWFjM80imEdqMbf3lrWqEfaHgaNku7nlpwPO1mu3/4Hr+XdNa5MhfnOnuPee4hyTLwOs3Vzz81wpbdzUxZSi2OmqMyI5oTaBYICfNHLwcuc65N5dbt6WKGeKgTpp4v7j7zwIDAQAB", + "version": "1.0.0.0", + "name": "1 content script", + "content_scripts": [ + { "matches": ["file://*"], "js": ["script1.js"] } + ] + }, + "path": "behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0", + "state": 1 + } + } + }, + "profile": { + "exited_cleanly": true, + "id": "not-signed-in", + "name": "", + "nickname": "" + }, + "session": { + "urls_to_restore_on_startup": [ ] + } +} diff --git a/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json new file mode 100755 index 0000000..8e7c687 --- /dev/null +++ b/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json @@ -0,0 +1,57 @@ +{ + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDuUZGKCDbff6IRaxa4Pue7PPkxwPaNhGT3JEqppEsNWFjM80imEdqMbf3lrWqEfaHgaNku7nlpwPO1mu3/4Hr+XdNa5MhfnOnuPee4hyTLwOs3Vzz81wpbdzUxZSi2OmqMyI5oTaBYICfNHLwcuc65N5dbt6WKGeKgTpp4v7j7zwIDAQAB", + "version": "1.0.0.0", + "name": "50 content scripts", + "content_scripts": [ + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] } + ] +} diff --git a/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/script.js b/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/script.js new file mode 100755 index 0000000..a7e6e1b --- /dev/null +++ b/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/script.js @@ -0,0 +1,4 @@ +// Useless script just to test injection. +var x = 1; +var y = 2; +var z = 3; diff --git a/chrome/test/data/extensions/profiles/content_scripts50/Default/Preferences b/chrome/test/data/extensions/profiles/content_scripts50/Default/Preferences new file mode 100755 index 0000000..4c5edab --- /dev/null +++ b/chrome/test/data/extensions/profiles/content_scripts50/Default/Preferences @@ -0,0 +1,85 @@ +{ + "download": { + "directory_upgrade": true, + "extensions_to_open": "" + }, + "extensions": { + "autoupdate": { + "next_check": "12897640036342487" + }, + "settings": { + "behllobkkfkfnphdnhnkndlbkcpglgmj": { + "location": 1, + "manifest": + { + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDuUZGKCDbff6IRaxa4Pue7PPkxwPaNhGT3JEqppEsNWFjM80imEdqMbf3lrWqEfaHgaNku7nlpwPO1mu3/4Hr+XdNa5MhfnOnuPee4hyTLwOs3Vzz81wpbdzUxZSi2OmqMyI5oTaBYICfNHLwcuc65N5dbt6WKGeKgTpp4v7j7zwIDAQAB", + "version": "1.0.0.0", + "name": "50 content scripts", + "content_scripts": [ + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] }, + { "matches": ["file://*"], "js": ["script1.js"] } + ] + }, + "path": "behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0", + "state": 1 + } + } + }, + "profile": { + "exited_cleanly": true, + "id": "not-signed-in", + "name": "", + "nickname": "" + }, + "session": { + "urls_to_restore_on_startup": [ ] + } +} diff --git a/chrome/test/data/extensions/profiles/empty/Default/Preferences b/chrome/test/data/extensions/profiles/empty/Default/Preferences new file mode 100644 index 0000000..60c1cb1 --- /dev/null +++ b/chrome/test/data/extensions/profiles/empty/Default/Preferences @@ -0,0 +1,15 @@ +{ + "download": { + "directory_upgrade": true, + "extensions_to_open": "" + }, + "profile": { + "exited_cleanly": true, + "id": "not-signed-in", + "name": "", + "nickname": "" + }, + "session": { + "urls_to_restore_on_startup": [ ] + } +} diff --git a/chrome/test/data/extensions/profiles/toolstrips1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json b/chrome/test/data/extensions/profiles/toolstrips1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json new file mode 100755 index 0000000..94c0e712 --- /dev/null +++ b/chrome/test/data/extensions/profiles/toolstrips1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json @@ -0,0 +1,8 @@ +{ + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDuUZGKCDbff6IRaxa4Pue7PPkxwPaNhGT3JEqppEsNWFjM80imEdqMbf3lrWqEfaHgaNku7nlpwPO1mu3/4Hr+XdNa5MhfnOnuPee4hyTLwOs3Vzz81wpbdzUxZSi2OmqMyI5oTaBYICfNHLwcuc65N5dbt6WKGeKgTpp4v7j7zwIDAQAB", + "version": "1.0.0.0", + "name": "1 toolstrip", + "toolstrips": [ + "toolstrip1.html" + ] +} diff --git a/chrome/test/data/extensions/profiles/toolstrips1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html b/chrome/test/data/extensions/profiles/toolstrips1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html new file mode 100755 index 0000000..d45660f --- /dev/null +++ b/chrome/test/data/extensions/profiles/toolstrips1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html @@ -0,0 +1,5 @@ +<select> + <option>one</option> + <option>two</option> + <option>three</option> +</select> diff --git a/chrome/test/data/extensions/profiles/toolstrips1/Default/Preferences b/chrome/test/data/extensions/profiles/toolstrips1/Default/Preferences new file mode 100755 index 0000000..a9b9760 --- /dev/null +++ b/chrome/test/data/extensions/profiles/toolstrips1/Default/Preferences @@ -0,0 +1,36 @@ +{ + "download": { + "directory_upgrade": true, + "extensions_to_open": "" + }, + "extensions": { + "autoupdate": { + "next_check": "12897640036342487" + }, + "settings": { + "behllobkkfkfnphdnhnkndlbkcpglgmj": { + "location": 1, + "manifest": + { + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDuUZGKCDbff6IRaxa4Pue7PPkxwPaNhGT3JEqppEsNWFjM80imEdqMbf3lrWqEfaHgaNku7nlpwPO1mu3/4Hr+XdNa5MhfnOnuPee4hyTLwOs3Vzz81wpbdzUxZSi2OmqMyI5oTaBYICfNHLwcuc65N5dbt6WKGeKgTpp4v7j7zwIDAQAB", + "version": "1.0.0.0", + "name": "1 toolstrip", + "toolstrips": [ + "toolstrip1.html" + ] + }, + "path": "behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0", + "state": 1 + } + } + }, + "profile": { + "exited_cleanly": true, + "id": "not-signed-in", + "name": "", + "nickname": "" + }, + "session": { + "urls_to_restore_on_startup": [ ] + } +} diff --git a/chrome/test/data/extensions/profiles/toolstrips50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json b/chrome/test/data/extensions/profiles/toolstrips50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json new file mode 100755 index 0000000..2053464 --- /dev/null +++ b/chrome/test/data/extensions/profiles/toolstrips50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json @@ -0,0 +1,73 @@ +{ + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDuUZGKCDbff6IRaxa4Pue7PPkxwPaNhGT3JEqppEsNWFjM80imEdqMbf3lrWqEfaHgaNku7nlpwPO1mu3/4Hr+XdNa5MhfnOnuPee4hyTLwOs3Vzz81wpbdzUxZSi2OmqMyI5oTaBYICfNHLwcuc65N5dbt6WKGeKgTpp4v7j7zwIDAQAB", + "version": "1.0.0.0", + "name": "50 toolstrips", + "toolstrips": [ + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html" + ] +} diff --git a/chrome/test/data/extensions/profiles/toolstrips50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html b/chrome/test/data/extensions/profiles/toolstrips50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html new file mode 100755 index 0000000..d45660f --- /dev/null +++ b/chrome/test/data/extensions/profiles/toolstrips50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html @@ -0,0 +1,5 @@ +<select> + <option>one</option> + <option>two</option> + <option>three</option> +</select> diff --git a/chrome/test/data/extensions/profiles/toolstrips50/Default/Preferences b/chrome/test/data/extensions/profiles/toolstrips50/Default/Preferences new file mode 100755 index 0000000..d4b478c --- /dev/null +++ b/chrome/test/data/extensions/profiles/toolstrips50/Default/Preferences @@ -0,0 +1,101 @@ +{ + "download": { + "directory_upgrade": true, + "extensions_to_open": "" + }, + "extensions": { + "autoupdate": { + "next_check": "12897640036342487" + }, + "settings": { + "behllobkkfkfnphdnhnkndlbkcpglgmj": { + "location": 1, + "manifest": + { + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDuUZGKCDbff6IRaxa4Pue7PPkxwPaNhGT3JEqppEsNWFjM80imEdqMbf3lrWqEfaHgaNku7nlpwPO1mu3/4Hr+XdNa5MhfnOnuPee4hyTLwOs3Vzz81wpbdzUxZSi2OmqMyI5oTaBYICfNHLwcuc65N5dbt6WKGeKgTpp4v7j7zwIDAQAB", + "version": "1.0.0.0", + "name": "50 toolstrips", + "toolstrips": [ + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html", + "toolstrip1.html" + ] + }, + "path": "behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0", + "state": 1 + } + } + }, + "profile": { + "exited_cleanly": true, + "id": "not-signed-in", + "name": "", + "nickname": "" + }, + "session": { + "urls_to_restore_on_startup": [ ] + } +} diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc index c32c66f..eac8173 100644 --- a/chrome/test/startup/startup_test.cc +++ b/chrome/test/startup/startup_test.cc @@ -27,6 +27,28 @@ class StartupTest : public UITest { void SetUp() {} void TearDown() {} + // Load a file on startup rather than about:blank. This tests a longer + // startup path, including resource loading and the loading of gears.dll. + void SetUpWithFileURL() { + FilePath file_url; + ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &file_url)); + file_url = file_url.AppendASCII("empty.html"); + ASSERT_TRUE(file_util::PathExists(file_url)); + launch_arguments_.AppendLooseValue(file_url.ToWStringHack()); + + pages_ = WideToUTF8(file_url.ToWStringHack()); + } + + // Use the given profile in the test data extensions/profiles dir. This tests + // startup with extensions installed. + void SetUpWithExtensionsProfile(const char* profile) { + FilePath data_dir; + PathService::Get(chrome::DIR_TEST_DATA, &data_dir); + data_dir = data_dir.AppendASCII("extensions").AppendASCII("profiles"). + AppendASCII(profile); + set_template_user_data(data_dir.ToWStringHack()); + } + void RunStartupTest(const char* graph, const char* trace, bool test_cold, bool important, int profile_type) { profile_type_ = profile_type; @@ -85,10 +107,9 @@ class StartupTest : public UITest { // Re-use the profile data after first run so that the noise from // creating databases doesn't impact all the runs. clear_profile_ = false; - // Destroy template_user_data_ for complex/gtk themes so we don't try - // to rewrite each time through. - if (profile_type != UITest::DEFAULT_THEME) - set_template_user_data(L""); + // Clear template_user_data_ so we don't try to copy it over each time + // through. + set_template_user_data(L""); } } @@ -121,21 +142,6 @@ class StartupReferenceTest : public StartupTest { } }; -class StartupFileTest : public StartupTest { - public: - // Load a file on startup rather than about:blank. This tests a longer - // startup path, including resource loading and the loading of gears.dll. - void SetUp() { - FilePath file_url; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &file_url)); - file_url = file_url.AppendASCII("empty.html"); - ASSERT_TRUE(file_util::PathExists(file_url)); - launch_arguments_.AppendLooseValue(file_url.ToWStringHack()); - - pages_ = WideToUTF8(file_url.ToWStringHack()); - } -}; - TEST_F(StartupTest, Perf) { RunStartupTest("warm", "t", false /* not cold */, true /* important */, UITest::DEFAULT_THEME); @@ -154,14 +160,56 @@ TEST_F(StartupTest, PerfCold) { UITest::DEFAULT_THEME); } +TEST_F(StartupTest, PerfExtensionEmpty) { + SetUpWithFileURL(); + SetUpWithExtensionsProfile("empty"); + RunStartupTest("warm", "t", false /* cold */, false /* not important */, + UITest::DEFAULT_THEME); +} + +TEST_F(StartupTest, PerfExtensionToolstrips1) { + SetUpWithFileURL(); + SetUpWithExtensionsProfile("toolstrips1"); + RunStartupTest("warm", "extension_toolstrip1", + false /* cold */, false /* not important */, + UITest::DEFAULT_THEME); +} + +TEST_F(StartupTest, PerfExtensionToolstrips50) { + SetUpWithFileURL(); + SetUpWithExtensionsProfile("toolstrips50"); + RunStartupTest("warm", "extension_toolstrip50", + false /* cold */, false /* not important */, + UITest::DEFAULT_THEME); +} + +TEST_F(StartupTest, PerfExtensionContentScript1) { + SetUpWithFileURL(); + SetUpWithExtensionsProfile("content_scripts1"); + RunStartupTest("warm", "extension_content_scripts1", + false /* cold */, false /* not important */, + UITest::DEFAULT_THEME); +} + +TEST_F(StartupTest, PerfExtensionContentScript50) { + SetUpWithFileURL(); + SetUpWithExtensionsProfile("content_scripts50"); + RunStartupTest("warm", "extension_content_scripts50", + false /* cold */, false /* not important */, + UITest::DEFAULT_THEME); +} + + #if defined(OS_WIN) // TODO(port): Enable gears tests on linux/mac once gears is working. -TEST_F(StartupFileTest, PerfGears) { +TEST_F(StartupTest, PerfGears) { + SetUpWithFileURL(); RunStartupTest("warm", "gears", false /* not cold */, false /* not important */, UITest::DEFAULT_THEME); } -TEST_F(StartupFileTest, PerfColdGears) { +TEST_F(StartupTest, PerfColdGears) { + SetUpWithFileURL(); RunStartupTest("cold", "gears", true /* cold */, false /* not important */, UITest::DEFAULT_THEME); } |