| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/shell/application_manager/data_pipe_peek.h" | 5 #include "mojo/shell/data_pipe_peek.h" |
| 6 | 6 |
| 7 #include "mojo/shell/context.h" | 7 #include "mojo/runner/context.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace mojo { | 10 namespace mojo { |
| 11 namespace shell { | 11 namespace shell { |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 TEST(DataPipePeek, PeekNBytes) { | 14 TEST(DataPipePeek, PeekNBytes) { |
| 15 Context::EnsureEmbedderIsInitialized(); | 15 Context::EnsureEmbedderIsInitialized(); |
| 16 | 16 |
| 17 DataPipe data_pipe; | 17 DataPipe data_pipe; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // If the max_line_length parameter is less than the length of the | 104 // If the max_line_length parameter is less than the length of the |
| 105 // newline terminated string, then peek should fail. | 105 // newline terminated string, then peek should fail. |
| 106 | 106 |
| 107 max_str_length = 3; | 107 max_str_length = 3; |
| 108 EXPECT_FALSE(BlockingPeekLine(consumer, &str, max_str_length, timeout)); | 108 EXPECT_FALSE(BlockingPeekLine(consumer, &str, max_str_length, timeout)); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace | 111 } // namespace |
| 112 } // namespace shell | 112 } // namespace shell |
| 113 } // namespace mojo | 113 } // namespace mojo |
| OLD | NEW |