| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 | 4 |
| 5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] | 5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] |
| 6 module mojo.test; | 6 module mojo.test; |
| 7 | 7 |
| 8 import "mojo/public/interfaces/bindings/tests/rect.mojom"; | 8 import "mojo/public/interfaces/bindings/tests/rect.mojom"; |
| 9 | 9 |
| 10 struct NamedRegion { | 10 struct NamedRegion { |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 [MinVersion=3] | 353 [MinVersion=3] |
| 354 string? f_string; | 354 string? f_string; |
| 355 [MinVersion=5] | 355 [MinVersion=5] |
| 356 array<int8>? f_array; | 356 array<int8>? f_array; |
| 357 [MinVersion=7] | 357 [MinVersion=7] |
| 358 handle<message_pipe>? f_message_pipe; | 358 handle<message_pipe>? f_message_pipe; |
| 359 [MinVersion=7] | 359 [MinVersion=7] |
| 360 bool f_bool; | 360 bool f_bool; |
| 361 }; | 361 }; |
| 362 | 362 |
| 363 // A struct where the fields are not sorted by their ordinals. |
| 364 struct ReorderedStruct { |
| 365 [MinVersion=2] |
| 366 int32 a@3 = 3; |
| 367 [MinVersion=4] |
| 368 int32 b@6 = 6; |
| 369 [MinVersion=1] |
| 370 int32 c@1 = 1; |
| 371 }; |
| 372 |
| 363 // Used to verify that interfaces that are struct members can be defined in the | 373 // Used to verify that interfaces that are struct members can be defined in the |
| 364 // same file. | 374 // same file. |
| 365 | 375 |
| 366 interface SomeInterface { | 376 interface SomeInterface { |
| 367 SomeMethod(RectPair pair) => (RectPair other_pair); | 377 SomeMethod(RectPair pair) => (RectPair other_pair); |
| 368 }; | 378 }; |
| 369 | 379 |
| 370 struct ContainsInterface { | 380 struct ContainsInterface { |
| 371 SomeInterface some_interface; | 381 SomeInterface some_interface; |
| 372 }; | 382 }; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 395 struct ContainsHashable { | 405 struct ContainsHashable { |
| 396 TypemappedRect rect; | 406 TypemappedRect rect; |
| 397 }; | 407 }; |
| 398 | 408 |
| 399 // Used to test that nested structs can be hashed. The nested struct mustn't be | 409 // Used to test that nested structs can be hashed. The nested struct mustn't be |
| 400 // nullable. | 410 // nullable. |
| 401 | 411 |
| 402 struct SimpleNestedStruct { | 412 struct SimpleNestedStruct { |
| 403 ContainsOther nested; | 413 ContainsOther nested; |
| 404 }; | 414 }; |
| OLD | NEW |