| OLD | NEW |
| 1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 */ | |
| 5 | 4 |
| 6 #include <errno.h> | 5 #include <errno.h> |
| 7 #include <fcntl.h> | 6 #include <fcntl.h> |
| 8 #include <string.h> | 7 #include <string.h> |
| 9 #include <sys/stat.h> | 8 #include <sys/stat.h> |
| 10 #include <string> | 9 #include <string> |
| 11 | 10 |
| 12 #include "gtest/gtest.h" | 11 #include "gtest/gtest.h" |
| 13 #include "nacl_io/ioctl.h" | 12 #include "nacl_io/ioctl.h" |
| 14 #include "nacl_io/mount.h" | 13 #include "nacl_io/mount.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 100 - content.size())); | 359 100 - content.size())); |
| 361 | 360 |
| 362 // Now we try to send something with an invalid prefix | 361 // Now we try to send something with an invalid prefix |
| 363 std::string bogus_message("Woah there, this message has no valid prefix"); | 362 std::string bogus_message("Woah there, this message has no valid prefix"); |
| 364 struct tioc_nacl_input_string bogus_pack; | 363 struct tioc_nacl_input_string bogus_pack; |
| 365 bogus_pack.length = bogus_message.size(); | 364 bogus_pack.length = bogus_message.size(); |
| 366 bogus_pack.buffer = bogus_message.data(); | 365 bogus_pack.buffer = bogus_message.data(); |
| 367 EXPECT_EQ(ENOTTY, dev_tty->Ioctl(TIOCNACLINPUT, | 366 EXPECT_EQ(ENOTTY, dev_tty->Ioctl(TIOCNACLINPUT, |
| 368 reinterpret_cast<char*>(&bogus_pack))); | 367 reinterpret_cast<char*>(&bogus_pack))); |
| 369 } | 368 } |
| OLD | NEW |