| OLD | NEW |
| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 public WebPageSerializerClient { | 167 public WebPageSerializerClient { |
| 168 public: | 168 public: |
| 169 DomSerializerTests() | 169 DomSerializerTests() |
| 170 : serialized_(false), | 170 : serialized_(false), |
| 171 local_directory_name_(FILE_PATH_LITERAL("./dummy_files/")) {} | 171 local_directory_name_(FILE_PATH_LITERAL("./dummy_files/")) {} |
| 172 | 172 |
| 173 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 173 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 174 command_line->AppendSwitch(switches::kSingleProcess); | 174 command_line->AppendSwitch(switches::kSingleProcess); |
| 175 #if defined(OS_WIN) | 175 #if defined(OS_WIN) |
| 176 // Don't want to try to create a GPU process. | 176 // Don't want to try to create a GPU process. |
| 177 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); | 177 command_line->AppendSwitch(switches::kDisableGpu); |
| 178 #endif | 178 #endif |
| 179 } | 179 } |
| 180 | 180 |
| 181 // DomSerializerDelegate. | 181 // DomSerializerDelegate. |
| 182 virtual void didSerializeDataForFrame(const WebURL& frame_web_url, | 182 virtual void didSerializeDataForFrame(const WebURL& frame_web_url, |
| 183 const WebCString& data, | 183 const WebCString& data, |
| 184 PageSerializationStatus status) { | 184 PageSerializationStatus status) { |
| 185 | 185 |
| 186 GURL frame_url(frame_web_url); | 186 GURL frame_url(frame_web_url); |
| 187 // If the all frames are finished saving, check all finish status | 187 // If the all frames are finished saving, check all finish status |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 NavigateToURL(shell(), file_url); | 1017 NavigateToURL(shell(), file_url); |
| 1018 | 1018 |
| 1019 PostTaskToInProcessRendererAndWait( | 1019 PostTaskToInProcessRendererAndWait( |
| 1020 base::Bind( | 1020 base::Bind( |
| 1021 &DomSerializerTests:: | 1021 &DomSerializerTests:: |
| 1022 SubResourceForElementsInNonHTMLNamespaceOnRenderer, | 1022 SubResourceForElementsInNonHTMLNamespaceOnRenderer, |
| 1023 base::Unretained(this), file_url)); | 1023 base::Unretained(this), file_url)); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 } // namespace content | 1026 } // namespace content |
| OLD | NEW |