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

Side by Side Diff: chrome/browser/ui/pdf/pdf_browsertest.cc

Issue 16098006: Fixed pdf_browsertest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 7 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
« no previous file with comments | « no previous file | 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/hash.h" 6 #include "base/hash.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 UTF8ToUTF16("adipiscing"), 277 UTF8ToUTF16("adipiscing"),
278 true, false, NULL, NULL)); 278 true, false, NULL, NULL));
279 279
280 // Verify that copying selected text works. 280 // Verify that copying selected text works.
281 ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); 281 ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
282 // Reset the clipboard first. 282 // Reset the clipboard first.
283 ui::Clipboard::ObjectMap objects; 283 ui::Clipboard::ObjectMap objects;
284 ui::Clipboard::ObjectMapParams params; 284 ui::Clipboard::ObjectMapParams params;
285 params.push_back(std::vector<char>()); 285 params.push_back(std::vector<char>());
286 objects[ui::Clipboard::CBF_TEXT] = params; 286 objects[ui::Clipboard::CBF_TEXT] = params;
287 clipboard->WriteObjects(ui::Clipboard::BUFFER_STANDARD, 287 clipboard->WriteObjects(ui::Clipboard::BUFFER_STANDARD, objects);
288 objects,
289 ui::SourceTag());
290 288
291 browser()->tab_strip_model()->GetActiveWebContents()-> 289 browser()->tab_strip_model()->GetActiveWebContents()->
292 GetRenderViewHost()->Copy(); 290 GetRenderViewHost()->Copy();
293 ASSERT_NO_FATAL_FAILURE(WaitForResponse()); 291 ASSERT_NO_FATAL_FAILURE(WaitForResponse());
294 292
295 std::string text; 293 std::string text;
296 clipboard->ReadAsciiText(ui::Clipboard::BUFFER_STANDARD, &text); 294 clipboard->ReadAsciiText(ui::Clipboard::BUFFER_STANDARD, &text);
297 ASSERT_EQ("adipiscing", text); 295 ASSERT_EQ("adipiscing", text);
298 } 296 }
299 297
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 browser()->tab_strip_model()->GetActiveWebContents(), 409 browser()->tab_strip_model()->GetActiveWebContents(),
412 "reloadPDF();")); 410 "reloadPDF();"));
413 observer.Wait(); 411 observer.Wait();
414 412
415 ASSERT_EQ("success", 413 ASSERT_EQ("success",
416 browser()->tab_strip_model()->GetActiveWebContents()-> 414 browser()->tab_strip_model()->GetActiveWebContents()->
417 GetURL().query()); 415 GetURL().query());
418 } 416 }
419 417
420 } // namespace 418 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698