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

Side by Side Diff: chrome/renderer/render_view_browsertest.cc

Issue 3183009: WIP patch with fixes for building with Clang. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Update Created 10 years, 2 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
« no previous file with comments | « no previous file | llvm.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 6
7 #include "app/keyboard_codes.h" 7 #include "app/keyboard_codes.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // our JavaScript function. (See the above comment for the format.) 582 // our JavaScript function. (See the above comment for the format.)
583 static char expected_result[1024]; 583 static char expected_result[1024];
584 expected_result[0] = NULL; 584 expected_result[0] = NULL;
585 base::snprintf(&expected_result[0], 585 base::snprintf(&expected_result[0],
586 sizeof(expected_result), 586 sizeof(expected_result),
587 "\n" // texts in the <input> element 587 "\n" // texts in the <input> element
588 "%d,%s\n" // texts in the first <div> element 588 "%d,%s\n" // texts in the first <div> element
589 "%d,%s\n" // texts in the second <div> element 589 "%d,%s\n" // texts in the second <div> element
590 "%d,%s", // texts in the third <div> element 590 "%d,%s", // texts in the third <div> element
591 key_code, kModifierData[j].expected_result, 591 key_code, kModifierData[j].expected_result,
592 char_code[0], kModifierData[j].expected_result, 592 (int)char_code[0], kModifierData[j].expected_result,
593 key_code, kModifierData[j].expected_result); 593 key_code, kModifierData[j].expected_result);
594 594
595 // Retrieve the text in the test page and compare it with the expected 595 // Retrieve the text in the test page and compare it with the expected
596 // text created from a virtual-key code, a character code, and the 596 // text created from a virtual-key code, a character code, and the
597 // modifier-key status. 597 // modifier-key status.
598 const int kMaxOutputCharacters = 1024; 598 const int kMaxOutputCharacters = 1024;
599 std::string output = UTF16ToUTF8( 599 std::string output = UTF16ToUTF8(
600 GetMainFrame()->contentAsText(kMaxOutputCharacters)); 600 GetMainFrame()->contentAsText(kMaxOutputCharacters));
601 EXPECT_EQ(expected_result, output); 601 EXPECT_EQ(expected_result, output);
602 } 602 }
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 LoadHTML("<html><head><meta http-equiv=\"content-language\" " 1122 LoadHTML("<html><head><meta http-equiv=\"content-language\" "
1123 "content=\" fr , es,en \">" 1123 "content=\" fr , es,en \">"
1124 "</head><body>A random page with random content.</body></html>"); 1124 "</head><body>A random page with random content.</body></html>");
1125 ProcessPendingMessages(); 1125 ProcessPendingMessages();
1126 message = render_thread_.sink().GetUniqueMessageMatching( 1126 message = render_thread_.sink().GetUniqueMessageMatching(
1127 ViewHostMsg_PageContents::ID); 1127 ViewHostMsg_PageContents::ID);
1128 ASSERT_NE(static_cast<IPC::Message*>(NULL), message); 1128 ASSERT_NE(static_cast<IPC::Message*>(NULL), message);
1129 ViewHostMsg_PageContents::Read(message, &params); 1129 ViewHostMsg_PageContents::Read(message, &params);
1130 EXPECT_EQ("fr", params.d); 1130 EXPECT_EQ("fr", params.d);
1131 } 1131 }
OLDNEW
« no previous file with comments | « no previous file | llvm.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698