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

Side by Side Diff: Source/web/tests/WebPageNewSerializerTest.cpp

Issue 545123002: Cleanup namespace usage in Source/web/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | « Source/web/tests/WebInputEventConversionTest.cpp ('k') | Source/web/tests/WebUnitTests.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 #include "public/web/WebDocument.h" 40 #include "public/web/WebDocument.h"
41 #include "public/web/WebFrame.h" 41 #include "public/web/WebFrame.h"
42 #include "public/web/WebPageSerializer.h" 42 #include "public/web/WebPageSerializer.h"
43 #include "public/web/WebPageSerializerClient.h" 43 #include "public/web/WebPageSerializerClient.h"
44 #include "public/web/WebScriptSource.h" 44 #include "public/web/WebScriptSource.h"
45 #include "public/web/WebSettings.h" 45 #include "public/web/WebSettings.h"
46 #include "public/web/WebView.h" 46 #include "public/web/WebView.h"
47 #include "web/tests/FrameTestHelpers.h" 47 #include "web/tests/FrameTestHelpers.h"
48 #include <gtest/gtest.h> 48 #include <gtest/gtest.h>
49 49
50 using namespace blink; 50 namespace {
51 using blink::Document; 51
52 using blink::FrameTestHelpers::runPendingTasks; 52 using blink::FrameTestHelpers::runPendingTasks;
53 using blink::URLTestHelpers::toKURL; 53 using blink::URLTestHelpers::toKURL;
54 using blink::URLTestHelpers::registerMockedURLLoad; 54 using blink::URLTestHelpers::registerMockedURLLoad;
55 55 using namespace blink;
56 namespace {
57 56
58 class LineReader { 57 class LineReader {
59 public: 58 public:
60 LineReader(const std::string& text) : m_text(text), m_index(0) { } 59 LineReader(const std::string& text) : m_text(text), m_index(0) { }
61 bool getNextLine(std::string* line) 60 bool getNextLine(std::string* line)
62 { 61 {
63 line->clear(); 62 line->clear();
64 if (m_index >= m_text.length()) 63 if (m_index >= m_text.length())
65 return false; 64 return false;
66 65
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 // exactly two times. 487 // exactly two times.
489 size_t nbDataURLs = 0; 488 size_t nbDataURLs = 0;
490 LineReader lineReader(std::string(mhtmlData.data())); 489 LineReader lineReader(std::string(mhtmlData.data()));
491 std::string line; 490 std::string line;
492 while (lineReader.getNextLine(&line)) { 491 while (lineReader.getNextLine(&line)) {
493 if (line.find("data:text") != std::string::npos) 492 if (line.find("data:text") != std::string::npos)
494 nbDataURLs++; 493 nbDataURLs++;
495 } 494 }
496 EXPECT_EQ(2u, nbDataURLs); 495 EXPECT_EQ(2u, nbDataURLs);
497 } 496 }
OLDNEW
« no previous file with comments | « Source/web/tests/WebInputEventConversionTest.cpp ('k') | Source/web/tests/WebUnitTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698