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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/is_search_provider_installed.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <body>
3 <p>Test IsProviderInstalled.<p>
4 <div id=result>
5 </div>
6 <script>
7 var passedAll = true;
8
9 function log(message) {
10 document.getElementById("result").innerHTML += message + "<br>";
11 }
12
13 function logPassed(message) {
14 log("PASS: " + message);
15 }
16
17 function logFailed(message) {
18 passedAll = false;
19 log("FAIL: " + message);
20 }
21
22 function writeResult() {
23 var result = "1";
24 if (passedAll)
25 logPassed("Everything passed.");
26 else {
27 logFailed("At least one test failed.");
28 result = " " + document.body.innerText; // Add a space to ensure that the
29 // result doesn't resemble success.
30 }
31 document.cookie = document.location.hostname + "testResult=" + escape(result);
32 }
33
34 function MyObject() {
35 }
36
37 try {
38 MyObject.prototype.toString = function() { throw "test"; }
39 var object = new MyObject();
40
41 // Verify the search provider state for the current page.
42 var installed = window.external.IsSearchProviderInstalled(object)
43 writeResult();
44 } catch (e) {
45 logFailed("An exception occurred. Name: " + e.name + " Message: " +
46 e.message);
47 writeResult();
48 }
49 </script>
50 </body>
51 </html>
OLDNEW
« 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