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

Unified Diff: chrome/test/data/is_search_provider_installed_with_exception.html

Issue 7115006: Added a check for the utf8 string input being empty (NULL). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo. Created 9 years, 6 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
« no previous file with comments | « chrome/test/data/is_search_provider_installed.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/is_search_provider_installed_with_exception.html
diff --git a/chrome/test/data/is_search_provider_installed_with_exception.html b/chrome/test/data/is_search_provider_installed_with_exception.html
new file mode 100644
index 0000000000000000000000000000000000000000..73c51189b4292d469f30a4d465385ee3f2a49161
--- /dev/null
+++ b/chrome/test/data/is_search_provider_installed_with_exception.html
@@ -0,0 +1,51 @@
+<html>
+<body>
+<p>Test IsProviderInstalled.<p>
+<div id=result>
+</div>
+<script>
+var passedAll = true;
+
+function log(message) {
+ document.getElementById("result").innerHTML += message + "<br>";
+}
+
+function logPassed(message) {
+ log("PASS: " + message);
+}
+
+function logFailed(message) {
+ passedAll = false;
+ log("FAIL: " + message);
+}
+
+function writeResult() {
+ var result = "1";
+ if (passedAll)
+ logPassed("Everything passed.");
+ else {
+ logFailed("At least one test failed.");
+ result = " " + document.body.innerText; // Add a space to ensure that the
+ // result doesn't resemble success.
+ }
+ document.cookie = document.location.hostname + "testResult=" + escape(result);
+}
+
+function MyObject() {
+}
+
+try {
+ MyObject.prototype.toString = function() { throw "test"; }
+ var object = new MyObject();
+
+ // Verify the search provider state for the current page.
+ var installed = window.external.IsSearchProviderInstalled(object)
+ writeResult();
+} catch (e) {
+ logFailed("An exception occurred. Name: " + e.name + " Message: " +
+ e.message);
+ writeResult();
+}
+</script>
+</body>
+</html>
« no previous file with comments | « chrome/test/data/is_search_provider_installed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698