| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/image_decoder.h" | 5 #include "components/image_fetcher/content/image_decoder.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
| 11 #include "content/public/browser/browser_child_process_observer.h" | 11 #include "content/public/browser/browser_child_process_observer.h" |
| 12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "content/public/browser/child_process_data.h" | 13 #include "content/public/browser/child_process_data.h" |
| 14 #include "content/public/test/test_utils.h" | 14 #include "content/public/test/test_utils.h" |
| 15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 new content::MessageLoopRunner; | 272 new content::MessageLoopRunner; |
| 273 TestImageRequest test_request(runner->QuitClosure()); | 273 TestImageRequest test_request(runner->QuitClosure()); |
| 274 ImageDecoder::Start(&test_request, GetValidPngData()); | 274 ImageDecoder::Start(&test_request, GetValidPngData()); |
| 275 runner->Run(); | 275 runner->Run(); |
| 276 if (!test_request.decode_succeeded()) { | 276 if (!test_request.decode_succeeded()) { |
| 277 // The UI thread won the race. Make sure the utility process did get killed. | 277 // The UI thread won the race. Make sure the utility process did get killed. |
| 278 EXPECT_TRUE(observer.did_kill()); | 278 EXPECT_TRUE(observer.did_kill()); |
| 279 } | 279 } |
| 280 // Else the IO thread won the race and the image got decoded. Oh well. | 280 // Else the IO thread won the race and the image got decoded. Oh well. |
| 281 } | 281 } |
| OLD | NEW |