Fix RemoveUnnecessaryParenthesesTest for Windows.

Using absolute offsets does not work well, on Windows lines endings
are `\r\n` vs. just `\n` on Mac.

R=brianwilkerson@google.com

Change-Id: Ia64e532687bcb7b197cff3ffb4514391fcc1d84e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
index 206e56f..88b7f30 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
@@ -47,7 +47,9 @@
   ((42));
 }
 ''');
-    await assertNoFix(errorFilter: (e) => e.offset == 14);
+    await assertNoFix(
+      errorFilter: (e) => e.offset == testCode.indexOf('(42'),
+    );
   }
 
   Future<void> test_double_atOuter() async {
@@ -60,7 +62,7 @@
 void f() {
   (42);
 }
-''', errorFilter: (e) => e.offset == 13);
+''', errorFilter: (e) => e.offset == testCode.indexOf('((42'));
   }
 
   Future<void> test_single() async {